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] Added method XendDomain.privilegedDomain and use that in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added method XendDomain.privilegedDomain and use that inside DevController to
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Oct 2005 23:46:10 +0000
Delivery-date: Mon, 03 Oct 2005 23:43:40 +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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@ewan
# Node ID cc998831741663583b64fc4c05f7d8f610a478aa
# Parent  716a0d177ffa27f3d5c7caf8acfb7b4ff9fd6384
Added method XendDomain.privilegedDomain and use that inside DevController to
avoid hard-coding the domain ID 0.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 716a0d177ffa -r cc9988317416 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Oct  3 22:28:24 2005
+++ b/tools/python/xen/xend/XendDomain.py       Mon Oct  3 23:21:49 2005
@@ -284,6 +284,11 @@
                 pass
         return dominfo
 
+
+    def privilegedDomain(self):
+        return self.domains[PRIV_DOMAIN]
+
+ 
     def domain_unpause(self, id):
         """Unpause domain execution.
 
diff -r 716a0d177ffa -r cc9988317416 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Mon Oct  3 22:28:24 2005
+++ b/tools/python/xen/xend/server/DevController.py     Mon Oct  3 23:21:49 2005
@@ -189,8 +189,17 @@
         """
 
         import xen.xend.XendDomain
-        backdom = xen.xend.XendDomain.instance().domain_lookup_by_name(
-            sxp.child_value(config, 'backend', '0'))
+        xd = xen.xend.XendDomain.instance()
+
+        backdom_name = sxp.child_value(config, 'backend')
+        if backdom_name:
+            backdom = xd.domain_lookup_by_name(backdom_name)
+        else:
+            backdom = xd.privilegedDomain()
+
+        if not backdom:
+            raise VmError("Cannot configure device for unknown backend %s" %
+                          backdom_name)
 
         frontpath = self.frontendPath(devid)
         backpath  = self.backendPath(backdom, devid)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added method XendDomain.privilegedDomain and use that inside DevController to, Xen patchbot -unstable <=