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] xm: Fix xm network-list for XenAPI

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Fix xm network-list for XenAPI
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 02:15:13 -0800
Delivery-date: Mon, 22 Feb 2010 02:15:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1266832824 0
# Node ID b9a84ded541f7e4ca12cfe4c764ded332ff01ddd
# Parent  a591bf0a9dd63b2061c5f8d3fc5651687d14173e
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@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r a591bf0a9dd6 -r b9a84ded541f tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Mon Feb 22 09:58:48 2010 +0000
+++ b/tools/python/xen/xm/main.py       Mon Feb 22 10:00:24 2010 +0000
@@ -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:

_______________________________________________
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] xm: Fix xm network-list for XenAPI, Xen patchbot-unstable <=