ia64/xen-unstable

changeset 6229:18f04796ea89

merge
author iap10@freefall.cl.cam.ac.uk
date Wed Aug 17 12:30:04 2005 +0000 (2005-08-17)
parents 451669097ffd 6b6588e66b96
children c983f822a39b 9471090bb8ec
files tools/examples/network-bridge tools/python/setup.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py
line diff
     3.1 --- a/tools/python/xen/xend/XendDomain.py	Wed Aug 17 12:29:34 2005 +0000
     3.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed Aug 17 12:30:04 2005 +0000
     3.3 @@ -320,8 +320,7 @@ class XendDomain:
     3.4          @param vmconfig: vm configuration
     3.5          """
     3.6          config = sxp.child_value(vmconfig, 'config')
     3.7 -        uuid = sxp.child_value(vmconfig, 'uuid')
     3.8 -        dominfo = XendDomainInfo.restore(self.dbmap, config, uuid=uuid)
     3.9 +        dominfo = XendDomainInfo.restore(self.dbmap, config)
    3.10          return dominfo
    3.11  
    3.12      def domain_restore(self, src, progress=False):
     4.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 17 12:29:34 2005 +0000
     4.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 17 12:30:04 2005 +0000
     4.3 @@ -195,13 +195,15 @@ class XendDomainInfo:
     4.4  
     4.5      recreate = classmethod(recreate)
     4.6  
     4.7 -    def restore(cls, parentdb, config, uuid):
     4.8 +    def restore(cls, parentdb, config, uuid=None):
     4.9          """Create a domain and a VM object to do a restore.
    4.10  
    4.11          @param parentdb:  parent db
    4.12          @param config:    domain configuration
    4.13          @param uuid:      uuid to use
    4.14          """
    4.15 +        if not uuid:
    4.16 +            uuid = getUuid()
    4.17          db = parentdb.addChild(uuid)
    4.18          vm = cls(db)
    4.19          ssidref = int(sxp.child_value(config, 'ssidref'))