ia64/xen-unstable

changeset 4980:1034f1c883a8

bitkeeper revision 1.1448 (428b47af0x8GpvwaOLe3pZhqoFQaJg)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk
date Wed May 18 13:48:31 2005 +0000 (2005-05-18)
parents d5741cfb6618 f9b5fb17e2e5
children 4dbe9e466b85 09d09fe7cd07
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Wed May 18 13:33:56 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed May 18 13:48:31 2005 +0000
     1.3 @@ -313,13 +313,7 @@ class XendDomain:
     1.4          # Add entries for any domains we don't know about.
     1.5          for (id, d) in doms.items():
     1.6              if id not in self.domain_by_id:
     1.7 -                log.info("Creating entry for unknown domain: id=%s", id)
     1.8 -                savedinfo = None
     1.9 -                try:
    1.10 -                    dominfo = XendDomainInfo.vm_recreate(savedinfo, d)
    1.11 -                    self._add_domain(dominfo)
    1.12 -                except Exception, ex:
    1.13 -                    log.exception("Error creating domain info: id=%s", id)
    1.14 +                self.domain_lookup(id)
    1.15          # Remove entries for domains that no longer exist.
    1.16          # Update entries for existing domains.
    1.17          for d in self.domain_by_id.values():
    1.18 @@ -449,6 +443,15 @@ class XendDomain:
    1.19          dominfo = self.domain_by_name.get(name) or self.domain_by_id.get(name)
    1.20          if dominfo:
    1.21              return dominfo
    1.22 +        try:
    1.23 +            log.info("Creating entry for unknown domain: id=%s", name)
    1.24 +            d = self.xen_domain(name)
    1.25 +            if d:
    1.26 +                dominfo = XendDomainInfo.vm_recreate(None, d)
    1.27 +                self._add_domain(dominfo)
    1.28 +                return dominfo
    1.29 +        except Exception, ex:
    1.30 +            log.exception("Error creating domain info: id=%s", name)
    1.31          raise XendError('invalid domain: ' + name)
    1.32  
    1.33      def domain_exists(self, name):