Don't do device create on domain recreate.

Also don't add XendDomainInfo object to XendDomain dictionary from
XendDomainInfo object but do it in XendDomain.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-09-19 13:23:22 +00:00
1 parent 403d1cc0a8
commit 5d9baf7940
2 files changed
+3 -6

No files matched your search

+1
View File
@@ -276,6 +276,7 @@ class XendDomain:
@return: domain
"""
dominfo = XendDomainInfo.create(self.dbmap, config)
self._add_domain(dominfo)
return dominfo
def domain_restart(self, dominfo):
+2 -6
View File
@@ -538,7 +538,6 @@ class XendDomainInfo:
self.init_image()
self.configure_cpus(config)
self.init_domain()
self.register_domain()
# Create domain devices.
self.configure_backends()
@@ -554,11 +553,6 @@ class XendDomainInfo:
self.destroy()
raise
def register_domain(self):
xd = get_component('xen.xend.XendDomain')
xd._add_domain(self)
self.exportToDB(save=True)
def configure_cpus(self, config):
try:
self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
@@ -746,6 +740,8 @@ class XendDomainInfo:
@raise: VmError for invalid devices
"""
if self.recreate:
return
if not self.rebooting():
self.create_configured_devices()
self.image.createDeviceModel()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.