ia64/xen-unstable

changeset 6956:b5bf198f0113

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>
author cl349@firebug.cl.cam.ac.uk
date Mon Sep 19 13:23:22 2005 +0000 (2005-09-19)
parents 5c0ec0b171f0
children c0c96a494c76
files tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Mon Sep 19 11:01:18 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Mon Sep 19 13:23:22 2005 +0000
     1.3 @@ -276,6 +276,7 @@ class XendDomain:
     1.4          @return: domain
     1.5          """
     1.6          dominfo = XendDomainInfo.create(self.dbmap, config)
     1.7 +        self._add_domain(dominfo)
     1.8          return dominfo
     1.9  
    1.10      def domain_restart(self, dominfo):
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Sep 19 11:01:18 2005 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Sep 19 13:23:22 2005 +0000
     2.3 @@ -538,7 +538,6 @@ class XendDomainInfo:
     2.4              self.init_image()
     2.5              self.configure_cpus(config)
     2.6              self.init_domain()
     2.7 -            self.register_domain()
     2.8  
     2.9              # Create domain devices.
    2.10              self.configure_backends()
    2.11 @@ -554,11 +553,6 @@ class XendDomainInfo:
    2.12              self.destroy()
    2.13              raise
    2.14  
    2.15 -    def register_domain(self):
    2.16 -        xd = get_component('xen.xend.XendDomain')
    2.17 -        xd._add_domain(self)
    2.18 -        self.exportToDB(save=True)
    2.19 -
    2.20      def configure_cpus(self, config):
    2.21          try:
    2.22              self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
    2.23 @@ -746,6 +740,8 @@ class XendDomainInfo:
    2.24  
    2.25          @raise: VmError for invalid devices
    2.26          """
    2.27 +        if self.recreate:
    2.28 +            return
    2.29          if not self.rebooting():
    2.30              self.create_configured_devices()
    2.31          self.image.createDeviceModel()