ia64/xen-unstable

changeset 6791:5aa6a2eff69f

Added isDevControllerClass so that XendDomainInfo does not need to store the same information internally. This may soon go, depending on how useful controller.py turns out to be.
author ewan@linford.intra
date Tue Sep 13 14:49:37 2005 +0100 (2005-09-13)
parents c5045197dcb7
children 98c5c6a1e857
files tools/python/xen/xend/server/controller.py
line diff
     1.1 --- a/tools/python/xen/xend/server/controller.py	Tue Sep 13 14:48:22 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/controller.py	Tue Sep 13 14:49:37 2005 +0100
     1.3 @@ -63,6 +63,13 @@ def addDevControllerClass(name, cls):
     1.4      cls.type = name
     1.5      getDevControllerTable().addDevControllerClass(cls)
     1.6  
     1.7 +
     1.8 +def isDevControllerClass(name):
     1.9 +    """@return True if a device controller class has been registered with
    1.10 +    the controller table under the given name."""
    1.11 +    return name in getDevControllerTable().controllerClasses
    1.12 +
    1.13 +
    1.14  def createDevController(name, vm, recreate=False):
    1.15      return getDevControllerTable().createDevController(name, vm, recreate=recreate)
    1.16