Persist the VLAN setting.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-12-25 17:02:16 +00:00
1 parent 0d46f85d6c
commit 686cfca86a
2 files changed
+7 -6

No files matched your search

+2 -1
View File
@@ -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
+5 -5
View File
@@ -99,12 +99,12 @@ def same_dir_rename(old_path, new_path):
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.