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

[Xen-changelog] [xen-unstable] [XEND] Make sure UUID is in the right format.



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 28403de6c4158ffe23cac8714632e855f151c3cc
# Parent  da87dc126b33d771f50336de30330c81d8eed32d
[XEND] Make sure UUID is in the right format.

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

diff -r da87dc126b33 -r 28403de6c415 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Fri Dec 08 11:57:06 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Fri Dec 08 13:28:22 2006 +0000
@@ -390,11 +390,16 @@ class XendConfig(dict):
         if self.get('vcpus_number') != None:
             self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
 
+    def _uuid_sanity_check(self):
+        """Make sure UUID is in proper string format with hyphens."""
+        self['uuid'] = uuid.toString(uuid.fromString(self['uuid']))
+
     def validate(self):
         self._memory_sanity_check()
         self._actions_sanity_check()
         self._builder_sanity_check()
         self._vcpus_sanity_check()
+        self._uuid_sanity_check()
 
     def _dominfo_to_xapi(self, dominfo):
         self['domid'] = dominfo['domid']

_______________________________________________
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®.