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] Persist the VLAN setting.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Persist the VLAN setting.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Dec 2006 10:55:16 -0800
Delivery-date: Mon, 25 Dec 2006 10:56:18 -0800
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 1167066136 0
# Node ID 159ae46d5e7fdf63a1cc21b3d0f634d85bf2703f
# Parent  c1aecee76db551e03f0b7af6d1c1123036891ec0
Persist the VLAN setting.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendNode.py |    3 ++-
 tools/python/xen/xend/XendPIF.py  |   10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff -r c1aecee76db5 -r 159ae46d5e7f tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Mon Dec 25 16:56:46 2006 +0000
+++ b/tools/python/xen/xend/XendNode.py Mon Dec 25 17:02:16 2006 +0000
@@ -107,6 +107,7 @@ class XendNode:
                     self.pifs[pif_uuid] = XendPIF(pif_uuid,
                                                   pif['name'],
                                                   pif['MTU'],
+                                                  pif['VLAN'],
                                                   pif['MAC'],
                                                   network,
                                                   self)
@@ -114,7 +115,7 @@ class XendNode:
             for name, mtu, mac in linux_get_phy_ifaces():
                 network = self.networks.values()[0]
                 pif_uuid = uuid.createString()
-                pif = XendPIF(pif_uuid, name, mtu, mac, network, self)
+                pif = XendPIF(pif_uuid, name, mtu, '', mac, network, self)
                 self.pifs[pif_uuid] = pif
 
         # initialise storage
diff -r c1aecee76db5 -r 159ae46d5e7f tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py  Mon Dec 25 16:56:46 2006 +0000
+++ b/tools/python/xen/xend/XendPIF.py  Mon Dec 25 17:02:16 2006 +0000
@@ -99,12 +99,12 @@ class XendPIF:
 class XendPIF:
     """Representation of a Physical Network Interface."""
     
-    def __init__(self, uuid, name, mtu, mac, network, host):
+    def __init__(self, uuid, name, mtu, vlan, mac, network, host):
         self.uuid = uuid
         self.name = name
         self.mac = mac
         self.mtu = mtu
-        self.vlan = ''
+        self.vlan = vlan
         self.network = network
         self.host = host
 
@@ -132,11 +132,11 @@ class XendPIF:
     def get_record(self, transient = True):
         result = {'name': self.name,
                   'MAC': self.mac,
-                  'MTU': self.mtu,
+                  'MTU': str(self.mtu),
                   'VLAN': self.vlan,
                   'host': self.host.uuid,
                   'network': self.network.uuid}
         if transient:
-            result['io_read_kbs'] = self.get_io_read_kbs()
-            result['io_write_kbs'] = self.get_io_write_kbs()
+            result['io_read_kbs'] = str(self.get_io_read_kbs())
+            result['io_write_kbs'] = str(self.get_io_write_kbs())
         return result

_______________________________________________
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] Persist the VLAN setting., Xen patchbot-unstable <=