[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] XendDomainInfo.py:



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.