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

Signed-off-by: Tim Kuik tkuik@cisco.com
This commit is contained in:
tkuik@tkuik-lnx2.cisco.com committed 2006-04-03 18:23:00 +01:00
1 parent 6daae768eb
commit d2a5e52e8c
1 file changed
+12 -1
+12 -1
View File
@@ -85,6 +85,13 @@ class DevController:
front)
import xen.xend.XendDomain
xd = xen.xend.XendDomain.instance()
backdom_name = sxp.child_value(config, 'backend')
if backdom_name is None:
backdom = xen.xend.XendDomain.PRIV_DOMAIN
else:
bd = xd.domain_lookup_by_name_nr(backdom_name)
backdom = bd.getDomid()
count = 0
while True:
t = xstransact()
@@ -112,9 +119,13 @@ class DevController:
t.mkdir(backpath)
t.set_permissions(backpath,
{'dom': xen.xend.XendDomain.PRIV_DOMAIN },
{'dom': backdom },
{'dom' : self.vm.getDomid(),
'read' : True })
t.mkdir(frontpath)
t.set_permissions(frontpath,
{'dom': self.vm.getDomid()},
{'dom': backdom, 'read': True})
t.write2(frontpath, front)
t.write2(backpath, back)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.