WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix xm block-list through the Xen-API for

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix xm block-list through the Xen-API for managed domains.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 13:30:23 -0700
Delivery-date: Tue, 20 Mar 2007 13:30:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174412015 0
# Node ID 07d1bd92ade8cde4ed6862d76f8a60309b539ec8
# Parent  ee06d8b5712f7fd35f572f3182da160f915d691b
Fix xm block-list through the Xen-API for managed domains.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/main.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r ee06d8b5712f -r 07d1bd92ade8 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Mar 20 17:30:52 2007 +0000
+++ b/tools/python/xen/xm/main.py       Tue Mar 20 17:33:35 2007 +0000
@@ -37,6 +37,7 @@ import datetime
 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')
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix xm block-list through the Xen-API for managed domains., Xen patchbot-unstable <=