ia64/xen-unstable

changeset 12371:b15168de4d91

[XEND] Make clear the distinction between backendPath and backendRoot
in DevController.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Fri Nov 10 12:49:22 2006 +0000 (2006-11-10)
parents 40a9f315b708
children 7df5d39a0d9a
files tools/python/xen/xend/server/DevController.py
line diff
     1.1 --- a/tools/python/xen/xend/server/DevController.py	Fri Nov 10 12:48:18 2006 +0000
     1.2 +++ b/tools/python/xen/xend/server/DevController.py	Fri Nov 10 12:49:22 2006 +0000
     1.3 @@ -455,7 +455,9 @@ class DevController:
     1.4  
     1.5  
     1.6      def backendPath(self, backdom, devid):
     1.7 -        """@param backdom [XendDomainInfo] The backend domain info."""
     1.8 +        """Construct backend path given the backend domain and device id.
     1.9 +
    1.10 +        @param backdom [XendDomainInfo] The backend domain info."""
    1.11  
    1.12          return "%s/backend/%s/%s/%d" % (backdom.getDomainPath(),
    1.13                                          self.deviceClass,
    1.14 @@ -470,10 +472,10 @@ class DevController:
    1.15          return "%s/device/%s" % (self.vm.getDomainPath(), self.deviceClass)
    1.16  
    1.17      def backendRoot(self):
    1.18 -        import xen.xend.XendDomain
    1.19 +        """Construct backend root path assuming backend is domain 0."""
    1.20 +        from xen.xend.XendDomain import DOM0_ID
    1.21          from xen.xend.xenstore.xsutil import GetDomainPath
    1.22 -        backdom = xen.xend.XendDomain.DOM0_ID
    1.23 -        return "%s/backend/%s/%s" % (GetDomainPath(backdom),
    1.24 +        return "%s/backend/%s/%s" % (GetDomainPath(DOM0_ID),
    1.25                                       self.deviceClass, self.vm.getDomid())
    1.26  
    1.27      def frontendMiscPath(self):