ia64/xen-unstable

changeset 7083:679e93b5c6cd

Added getDeviceSxprs, to support xm block-list.
author emellor@ewan
date Tue Sep 27 22:05:03 2005 +0100 (2005-09-27)
parents 41735ccc5ee3
children 6f49c06d5feb
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Sep 27 22:03:55 2005 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Sep 27 22:05:03 2005 +0100
     1.3 @@ -734,13 +734,6 @@ class XendDomainInfo:
     1.4      __repr__ = __str__
     1.5  
     1.6  
     1.7 -    def getDeviceController(self, name):
     1.8 -        if name not in controllerClasses:
     1.9 -            raise XendError("unknown device type: " + str(name))
    1.10 -
    1.11 -        return controllerClasses[name](self)
    1.12 -
    1.13 -
    1.14      def createDevice(self, deviceClass, devconfig):
    1.15          return self.getDeviceController(deviceClass).createDevice(devconfig)
    1.16  
    1.17 @@ -754,6 +747,21 @@ class XendDomainInfo:
    1.18          return self.getDeviceController(deviceClass).destroyDevice(devid)
    1.19  
    1.20  
    1.21 +    def getDeviceSxprs(self, deviceClass):
    1.22 +        return self.getDeviceController(deviceClass).sxprs()
    1.23 +
    1.24 +
    1.25 +    ## private:
    1.26 +
    1.27 +    def getDeviceController(self, name):
    1.28 +        if name not in controllerClasses:
    1.29 +            raise XendError("unknown device type: " + str(name))
    1.30 +
    1.31 +        return controllerClasses[name](self)
    1.32 +
    1.33 +
    1.34 +    ## public:
    1.35 +
    1.36      def sxpr(self):
    1.37          sxpr = ['domain',
    1.38                  ['domid',   self.domid],