summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/eteutils/UUID.py
diff options
context:
space:
mode:
Diffstat (limited to 'robotframework-onap/eteutils/UUID.py')
-rw-r--r--robotframework-onap/eteutils/UUID.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/robotframework-onap/eteutils/UUID.py b/robotframework-onap/eteutils/UUID.py
new file mode 100644
index 0000000..35c26a7
--- /dev/null
+++ b/robotframework-onap/eteutils/UUID.py
@@ -0,0 +1,15 @@
+import uuid
+import time
+import datetime
+
+class UUID:
+ """UUID is a simple library that generates a uuid"""
+
+ def generate_UUID(self):
+ """generate a uuid"""
+ return uuid.uuid4()
+
+ def generate_MilliTimestamp_UUID(self):
+ """generate a millisecond timestamp uuid"""
+ then = datetime.datetime.now()
+ return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3) \ No newline at end of file