QubesNetVm: use xs module, not xenstore-* command

This commit is contained in:
Marek Marczykowski 2013-03-16 16:13:15 +01:00
parent 471896f38f
commit 8806aeab5c

View File

@ -113,17 +113,13 @@ class QubesNetVm(QubesVm):
if xid < 0: if xid < 0:
return return
command = [ perms = [ { 'dom': xid } ]
"/usr/bin/xenstore-chmod",
"/local/domain/{0}/qubes-netvm-external-ip".format(xid)
]
command.append("n{0}".format(xid)) for xid in self.__external_ip_allowed_xids:
perms.append({ 'dom': xid, 'read': True })
for id in self.__external_ip_allowed_xids: xs.set_permissions('', '/local/domain/{0}/qubes-netvm-external-ip'.format(xid),
command.append("r{0}".format(id)) perms)
return subprocess.check_call(command)
def start(self, **kwargs): def start(self, **kwargs):
if dry_run: if dry_run: