]> xenbits.xensource.com Git - xen.git/commitdiff
Revert 15642:207582c8d88b532783da5c6f5839336187556f0a.
authorKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:59:39 +0000 (09:59 +0100)
committerKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:59:39 +0000 (09:59 +0100)
This patch is now bogus since 15168:a717cb2fac90 is reverted
by 15973:8817a53c030f.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/XendDomain.py

index 5e09126bb28fc104b9c7f26764c2e016049e9f94..130ae1e8beb61d30f1fc2689c3da81c486004170 100644 (file)
@@ -51,7 +51,6 @@ from xen.xend.xenstore.xstransact import xstransact
 from xen.xend.xenstore.xswatch import xswatch
 from xen.util import mkdir
 from xen.xend import uuid
-from xen.xend import sxp
 
 xc = xen.lowlevel.xc.xc()
 xoptions = XendOptions.instance() 
@@ -969,31 +968,6 @@ class XendDomain:
         try:
             try:
                 domconfig = XendConfig.XendConfig(sxp_obj = config)
-                
-                domains = self.list('all')
-                domains = map(lambda dom: dom.sxpr(), domains)
-                for dom in domains:
-                    if sxp.child_value(config, 'uuid', None):
-                        if domconfig['uuid'] == sxp.child_value(dom, 'uuid'):
-                            if domconfig['name_label'] != sxp.child_value(dom, 'name'):
-                                raise XendError("Domain UUID '%s' is already used." % \
-                                                domconfig['uuid'])
-                            else:
-                                # Update the config for that existing domain
-                                # because it is same name and same UUID.
-                                break
-                        else:
-                            if domconfig['name_label'] == sxp.child_value(dom, 'name'):
-                                raise XendError("Domain name '%s' is already used." % \
-                                                domconfig['name_label'])
-                    else:
-                        if domconfig['name_label'] == sxp.child_value(dom, 'name'):
-                            # Overwrite the auto-generated UUID by the UUID
-                            # of the existing domain. And update the config
-                            # for that existing domain.
-                            domconfig['uuid'] = sxp.child_value(dom, 'uuid')
-                            break
-                
                 dominfo = XendDomainInfo.createDormant(domconfig)
                 log.debug("Creating new managed domain: %s" %
                           dominfo.getName())