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] XendDomainInfo.py:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] XendDomainInfo.py:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 06 Jun 2005 16:59:03 +0000
Delivery-date: Thu, 09 Jun 2005 17:05:51 +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.1662.1.8, 2005/06/06 17:59:03+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        XendDomainInfo.py:
          g/c configs array.
          Add change parameter to createDevice and pass it to controller.
          g/c config_devices.
        Signed-off-by: Mike Wray <mike.wray@xxxxxx>
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 XendDomainInfo.py |   37 +++----------------------------------
 1 files changed, 3 insertions(+), 34 deletions(-)


diff -Nru a/tools/python/xen/xend/XendDomainInfo.py 
b/tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   2005-06-09 13:06:50 -04:00
+++ b/tools/python/xen/xend/XendDomainInfo.py   2005-06-09 13:06:50 -04:00
@@ -237,8 +237,6 @@
         self.channel = None
         self.controllers = {}
         
-        self.configs = []
-        
         self.info = None
         self.blkif_backend = False
         self.netif_backend = False
@@ -333,9 +331,10 @@
         self.controllers[type] = ctrl
         return ctrl
 
-    def createDevice(self, type, devconfig):
+    def createDevice(self, type, devconfig, change=False):
         ctrl = self.findDeviceController(type)
-        return ctrl.createDevice(devconfig, recreate=self.recreate)
+        return ctrl.createDevice(devconfig, recreate=self.recreate,
+                                 change=change)
 
     def configureDevice(self, type, id, devconfig):
         ctrl = self.getDeviceController(type)
@@ -521,22 +520,6 @@
         #                            self.store_mfn,
         #                            self.store_channel)
 
-    def config_devices(self, name):
-        """Get a list of the 'device' nodes of a given type from the config.
-
-        @param name: device type
-        @type  name: string
-        @return: device configs
-        @rtype: list
-        """
-        devices = []
-        for d in sxp.children(self.config, 'device'):
-            dev = sxp.child0(d)
-            if dev is None: continue
-            if name == sxp.name(dev):
-                devices.append(dev)
-        return devices
-
     def get_device_savedinfo(self, type, id):
         val = None
         if self.savedinfo is None:
@@ -555,13 +538,6 @@
     def get_device_recreate(self, type, id):
         return self.get_device_savedinfo(type, id) or self.recreate
 
-    def add_config(self, val):
-        """Add configuration data to a virtual machine.
-
-        @param val: data to add
-        """
-        self.configs.append(val)
-
     def destroy(self):
         """Completely destroy the vm.
         """
@@ -606,8 +582,6 @@
         for ctrl in self.getDeviceControllers():
             if ctrl.isDestroyed(): continue
             ctrl.destroyController(reboot=reboot)
-        if not reboot:
-            self.configs = []
 
     def show(self):
         """Print virtual machine info.
@@ -615,11 +589,6 @@
         print "[VM dom=%d name=%s memory=%d" % (self.id, self.name, 
self.memory)
         print "image:"
         sxp.show(self.image)
-        print
-        for val in self.configs:
-            print "config:"
-            sxp.show(val)
-            print
         print "]"
 
     def init_domain(self):

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

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