ia64/xen-unstable

changeset 9573:7df5921af7e4

Allow a domain other than Domain-0 to be a backend.

Signed-off-by: Tim Kuik tkuik@cisco.com
author tkuik@tkuik-lnx2.cisco.com
date Mon Apr 03 18:23:00 2006 +0100 (2006-04-03)
parents 163c65c47d86
children c5a833aec2ab
files tools/python/xen/xend/server/DevController.py
line diff
     1.1 --- a/tools/python/xen/xend/server/DevController.py	Mon Apr 03 17:48:39 2006 +0100
     1.2 +++ b/tools/python/xen/xend/server/DevController.py	Mon Apr 03 18:23:00 2006 +0100
     1.3 @@ -85,6 +85,13 @@ class DevController:
     1.4                                                       front)
     1.5  
     1.6          import xen.xend.XendDomain
     1.7 +        xd = xen.xend.XendDomain.instance()
     1.8 +        backdom_name = sxp.child_value(config, 'backend')
     1.9 +        if backdom_name is None:
    1.10 +            backdom = xen.xend.XendDomain.PRIV_DOMAIN
    1.11 +        else:
    1.12 +            bd = xd.domain_lookup_by_name_nr(backdom_name)
    1.13 +            backdom = bd.getDomid()
    1.14          count = 0
    1.15          while True:
    1.16              t = xstransact()
    1.17 @@ -112,9 +119,13 @@ class DevController:
    1.18  
    1.19                  t.mkdir(backpath)
    1.20                  t.set_permissions(backpath,
    1.21 -                                  {'dom': xen.xend.XendDomain.PRIV_DOMAIN },
    1.22 +                                  {'dom': backdom },
    1.23                                    {'dom'  : self.vm.getDomid(),
    1.24                                     'read' : True })
    1.25 +                t.mkdir(frontpath)
    1.26 +                t.set_permissions(frontpath,
    1.27 +                                  {'dom': self.vm.getDomid()},
    1.28 +                                  {'dom': backdom, 'read': True})
    1.29  
    1.30                  t.write2(frontpath, front)
    1.31                  t.write2(backpath,  back)