Fix xm block-list through the Xen-API for managed domains.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Ewan Mellor committed 2007-03-20 17:33:35 +00:00
1 parent 3d9330324c
commit f7bff36895
1 file changed
+7 -1
+7 -1
View File
@@ -37,6 +37,7 @@ import time
import datetime
from select import select
import xml.dom.minidom
from xen.util.blkif import blkdev_name_to_number
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)
@@ -1724,7 +1725,12 @@ def xm_block_list(args):
vbd_refs = server.xenapi.VM.get_VBDs(get_single_vm(dom))
vbd_properties = \
map(server.xenapi.VBD.get_runtime_properties, vbd_refs)
devs = map(lambda x: [x.get('virtual-device'), map2sxp(x)], vbd_properties)
vbd_devs = \
map(server.xenapi.VBD.get_device, vbd_refs)
vbd_devids = \
map(blkdev_name_to_number, vbd_devs)
devs = map(lambda (devid, prop): [devid, map2sxp(prop)],
zip(vbd_devids, vbd_properties))
else:
devs = server.xend.domain.getDeviceSxprs(dom, 'vbd')
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.