mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
[XEND] Make sure UUID is in the right format.
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
b65f717688
commit
781b258bf0
1 file changed
+5
@@ -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']
|
||||
|
||||