WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] XendDomain.py:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] XendDomain.py:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 18 May 2005 13:48:23 +0000
Delivery-date: Wed, 18 May 2005 14:07:56 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1446.1.1, 2005/05/18 14:48:23+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        XendDomain.py:
          Move code to create dominfo entries for unknown domains into
          domain_lookup.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 XendDomain.py |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)


diff -Nru a/tools/python/xen/xend/XendDomain.py 
b/tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       2005-05-18 10:08:35 -04:00
+++ b/tools/python/xen/xend/XendDomain.py       2005-05-18 10:08:35 -04:00
@@ -313,13 +313,7 @@
         # Add entries for any domains we don't know about.
         for (id, d) in doms.items():
             if id not in self.domain_by_id:
-                log.info("Creating entry for unknown domain: id=%s", id)
-                savedinfo = None
-                try:
-                    dominfo = XendDomainInfo.vm_recreate(savedinfo, d)
-                    self._add_domain(dominfo)
-                except Exception, ex:
-                    log.exception("Error creating domain info: id=%s", id)
+                self.domain_lookup(id)
         # Remove entries for domains that no longer exist.
         # Update entries for existing domains.
         for d in self.domain_by_id.values():
@@ -449,6 +443,15 @@
         dominfo = self.domain_by_name.get(name) or self.domain_by_id.get(name)
         if dominfo:
             return dominfo
+        try:
+            log.info("Creating entry for unknown domain: id=%s", name)
+            d = self.xen_domain(name)
+            if d:
+                dominfo = XendDomainInfo.vm_recreate(None, d)
+                self._add_domain(dominfo)
+                return dominfo
+        except Exception, ex:
+            log.exception("Error creating domain info: id=%s", name)
         raise XendError('invalid domain: ' + name)
 
     def domain_exists(self, name):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>