# 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
|