Fixes undefined variable 'network_type' in OVS agent
bug 1045749 Change-Id: Icd2e79722cfcb816bfdfa85bd8b8ab5198908474
This commit is contained in:
parent
d8160e02bb
commit
fce952e8fa
@ -287,12 +287,13 @@ class OVSQuantumAgent(object):
|
|||||||
:param net_uuid: the network uuid associated with this vlan.
|
:param net_uuid: the network uuid associated with this vlan.
|
||||||
:param lvm: a LocalVLANMapping object that tracks (vlan, lsw_id,
|
:param lvm: a LocalVLANMapping object that tracks (vlan, lsw_id,
|
||||||
vif_ids) mapping.'''
|
vif_ids) mapping.'''
|
||||||
LOG.info("reclaming vlan = %s from net-id = %s" % (lvm.vlan, net_uuid))
|
LOG.info("reclaiming vlan = %s from net-id = %s" %
|
||||||
|
(lvm.vlan, net_uuid))
|
||||||
|
|
||||||
if lvm.network_type == constants.TYPE_GRE:
|
if lvm.network_type == constants.TYPE_GRE:
|
||||||
self.tun_br.delete_flows(tun_id=lvm.segmentation_id)
|
self.tun_br.delete_flows(tun_id=lvm.segmentation_id)
|
||||||
self.tun_br.delete_flows(dl_vlan=lvm.vlan)
|
self.tun_br.delete_flows(dl_vlan=lvm.vlan)
|
||||||
elif network_type == constants.TYPE_FLAT:
|
elif lvm.network_type == constants.TYPE_FLAT:
|
||||||
# outbound
|
# outbound
|
||||||
br = self.phys_brs[lvm.physical_network]
|
br = self.phys_brs[lvm.physical_network]
|
||||||
br.delete_flows(in_port=self.phys_ofports[lvm.physical_network],
|
br.delete_flows(in_port=self.phys_ofports[lvm.physical_network],
|
||||||
@ -301,7 +302,7 @@ class OVSQuantumAgent(object):
|
|||||||
br = self.int_br
|
br = self.int_br
|
||||||
br.delete_flows(in_port=self.int_ofports[lvm.physical_network],
|
br.delete_flows(in_port=self.int_ofports[lvm.physical_network],
|
||||||
dl_vlan=0xffff)
|
dl_vlan=0xffff)
|
||||||
elif network_type == constants.TYPE_VLAN:
|
elif lvm.network_type == constants.TYPE_VLAN:
|
||||||
# outbound
|
# outbound
|
||||||
br = self.phys_brs[lvm.physical_network]
|
br = self.phys_brs[lvm.physical_network]
|
||||||
br.delete_flows(in_port=self.phys_ofports[lvm.physical_network],
|
br.delete_flows(in_port=self.phys_ofports[lvm.physical_network],
|
||||||
|
Loading…
Reference in New Issue
Block a user