[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Add a convenience function for UUID generation



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID a3788998952d10b2e5df05c57f1d71ccdf609857
# Parent  4fd97b9aa31e02750d5b6b7b27be0e40cc3fd266
[XEND] Add a convenience function for UUID generation

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/uuid.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r 4fd97b9aa31e -r a3788998952d tools/python/xen/xend/uuid.py
--- a/tools/python/xen/xend/uuid.py     Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/xend/uuid.py     Thu Oct 05 17:29:19 2006 +0100
@@ -54,10 +54,6 @@ uuidFactory = getUuidRandom
 uuidFactory = getUuidRandom
 
 
-def create():
-    return uuidFactory()
-
-
 def toString(u):
     return "-".join(["%02x" * 4, "%02x" * 2, "%02x" * 2, "%02x" * 2,
                      "%02x" * 6]) % tuple(u)
@@ -65,3 +61,9 @@ def fromString(s):
 def fromString(s):
     s = s.replace('-', '')
     return [ int(s[i : i + 2], 16) for i in range(0, 32, 2) ]
+
+def create():
+    return uuidFactory()
+
+def createString():
+    return toString(create())

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.