diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-22 10:00:24 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-22 10:00:24 +0000 |
commit | fa2959b21f43eb37de9021a50ea7df0f2ee87a08 (patch) | |
tree | 63d5e5b1571ab2e5e732b25879e102e2b51e0735 /tools | |
parent | 15ce5466e147720e90e3bea0ff2748f82eecb624 (diff) | |
download | xen-fa2959b21f43eb37de9021a50ea7df0f2ee87a08.tar.gz xen-fa2959b21f43eb37de9021a50ea7df0f2ee87a08.tar.bz2 xen-fa2959b21f43eb37de9021a50ea7df0f2ee87a08.zip |
xm: Fix xm network-list for XenAPI
When I use XenAPI, MAC addresses are not shown by xm network-list.
MAC addresses are shown by this patch.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xm/main.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 0ca4f7a344..73e868f2cb 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -2144,8 +2144,11 @@ def xm_network_list(args): if serverType == SERVER_XEN_API: vif_refs = server.xenapi.VM.get_VIFs(get_single_vm(dom)) - vif_properties = \ - map(server.xenapi.VIF.get_runtime_properties, vif_refs) + vif_properties = [] + for vif_ref in vif_refs: + vif_property = server.xenapi.VIF.get_runtime_properties(vif_ref) + vif_property['mac'] = server.xenapi.VIF.get_MAC(vif_ref) + vif_properties.append(vif_property) devs = map(lambda (handle, properties): [handle, map2sxp(properties)], zip(range(len(vif_properties)), vif_properties)) else: |