debuggers.hg
changeset 12848:28403de6c415
[XEND] Make sure UUID is in the right format.
Signed-off-by: Alastair Tse <atse@xensource.com>
Signed-off-by: Alastair Tse <atse@xensource.com>
author | Alastair Tse <atse@xensource.com> |
---|---|
date | Fri Dec 08 13:28:22 2006 +0000 (2006-12-08) |
parents | da87dc126b33 |
children | a4d1f99e5a53 |
files | tools/python/xen/xend/XendConfig.py |
line diff
1.1 --- a/tools/python/xen/xend/XendConfig.py Fri Dec 08 11:57:06 2006 +0000 1.2 +++ b/tools/python/xen/xend/XendConfig.py Fri Dec 08 13:28:22 2006 +0000 1.3 @@ -390,11 +390,16 @@ class XendConfig(dict): 1.4 if self.get('vcpus_number') != None: 1.5 self['vcpu_avail'] = (1 << self['vcpus_number']) - 1 1.6 1.7 + def _uuid_sanity_check(self): 1.8 + """Make sure UUID is in proper string format with hyphens.""" 1.9 + self['uuid'] = uuid.toString(uuid.fromString(self['uuid'])) 1.10 + 1.11 def validate(self): 1.12 self._memory_sanity_check() 1.13 self._actions_sanity_check() 1.14 self._builder_sanity_check() 1.15 self._vcpus_sanity_check() 1.16 + self._uuid_sanity_check() 1.17 1.18 def _dominfo_to_xapi(self, dominfo): 1.19 self['domid'] = dominfo['domid']