Remove unneeded device_owner field from l2pop tuple
The DVR development added this device_owner to the middle of this tuple during early development because it was thought to be needed. Over the course of development, it was found to be unnecessary and much of the code that read it from this value was removed or obsoleted. That job went unfinished and so this commit completes it. This essentially restores the code to what it was before and fixes the regression that was caused. Change-Id: Ia901f925883b53e9880dd25688e16e0ffe402bf4 Partial-bug: #1352801
This commit is contained in:
parent
7c1cf48c7d
commit
63c0430bc2
@ -45,7 +45,7 @@ class L2populationMechanismDriver(api.MechanismDriver,
|
||||
self.remove_fdb_entries = {}
|
||||
|
||||
def _get_port_fdb_entries(self, port):
|
||||
return [[port['mac_address'], port['device_owner'],
|
||||
return [[port['mac_address'],
|
||||
ip['ip_address']] for ip in port['fixed_ips']]
|
||||
|
||||
def delete_port_precommit(self, context):
|
||||
@ -93,19 +93,17 @@ class L2populationMechanismDriver(api.MechanismDriver,
|
||||
return
|
||||
agent, agent_host, agent_ip, segment, port_fdb_entries = port_infos
|
||||
|
||||
orig_mac_devowner_ip = [[port['mac_address'], port['device_owner'], ip]
|
||||
for ip in orig_ips]
|
||||
port_mac_devowner_ip = [[port['mac_address'], port['device_owner'], ip]
|
||||
for ip in port_ips]
|
||||
orig_mac_ip = [[port['mac_address'], ip] for ip in orig_ips]
|
||||
port_mac_ip = [[port['mac_address'], ip] for ip in port_ips]
|
||||
|
||||
upd_fdb_entries = {port['network_id']: {agent_ip: {}}}
|
||||
|
||||
ports = upd_fdb_entries[port['network_id']][agent_ip]
|
||||
if orig_mac_devowner_ip:
|
||||
ports['before'] = orig_mac_devowner_ip
|
||||
if orig_mac_ip:
|
||||
ports['before'] = orig_mac_ip
|
||||
|
||||
if port_mac_devowner_ip:
|
||||
ports['after'] = port_mac_devowner_ip
|
||||
if port_mac_ip:
|
||||
ports['after'] = port_mac_ip
|
||||
|
||||
self.L2populationAgentNotify.update_fdb_entries(
|
||||
self.rpc_ctx, {'chg_ip': upd_fdb_entries})
|
||||
|
@ -374,13 +374,12 @@ class OVSNeutronAgent(n_rpc.RpcCallback,
|
||||
else:
|
||||
self.setup_entry_for_arp_reply(br, 'add', lvm.vlan, port_info[0],
|
||||
port_info[1])
|
||||
if not self.dvr_agent.is_dvr_router_interface(port_info[1]):
|
||||
br.add_flow(table=constants.UCAST_TO_TUN,
|
||||
priority=2,
|
||||
dl_vlan=lvm.vlan,
|
||||
dl_dst=port_info[0],
|
||||
actions="strip_vlan,set_tunnel:%s,output:%s" %
|
||||
(lvm.segmentation_id, ofport))
|
||||
br.add_flow(table=constants.UCAST_TO_TUN,
|
||||
priority=2,
|
||||
dl_vlan=lvm.vlan,
|
||||
dl_dst=port_info[0],
|
||||
actions="strip_vlan,set_tunnel:%s,output:%s" %
|
||||
(lvm.segmentation_id, ofport))
|
||||
|
||||
def del_fdb_flow(self, br, port_info, remote_ip, lvm, ofport):
|
||||
if port_info == q_const.FLOODING_ENTRY:
|
||||
|
@ -180,7 +180,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -249,7 +248,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.2': [constants.FLOODING_ENTRY,
|
||||
[p2['mac_address'],
|
||||
p2['device_owner'],
|
||||
p2_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -271,7 +269,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -320,7 +317,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'20.0.0.2':
|
||||
[constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -345,7 +341,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'20.0.0.1':
|
||||
[constants.FLOODING_ENTRY,
|
||||
[p3['mac_address'],
|
||||
p3['device_owner'],
|
||||
p3_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -394,7 +389,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{p2['network_id']:
|
||||
{'ports':
|
||||
{'20.0.0.1': [[p2['mac_address'],
|
||||
p2['device_owner'],
|
||||
p2_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -436,7 +430,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p2['mac_address'],
|
||||
p2['device_owner'],
|
||||
p2_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -481,7 +474,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{p2['network_id']:
|
||||
{'ports':
|
||||
{'20.0.0.1': [[p2['mac_address'],
|
||||
p2['device_owner'],
|
||||
p2_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -519,7 +511,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -561,7 +552,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{p1['network_id']:
|
||||
{'20.0.0.1':
|
||||
{'after': [[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
'10.0.0.10']]}}}}},
|
||||
'namespace': None,
|
||||
'method': 'update_fdb_entries'}
|
||||
@ -584,10 +574,8 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{p1['network_id']:
|
||||
{'20.0.0.1':
|
||||
{'before': [[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
'10.0.0.10']],
|
||||
'after': [[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
'10.0.0.16']]}}}}},
|
||||
'namespace': None,
|
||||
'method': 'update_fdb_entries'}
|
||||
@ -609,7 +597,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{p1['network_id']:
|
||||
{'20.0.0.1':
|
||||
{'before': [[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
'10.0.0.2']]}}}}},
|
||||
'namespace': None,
|
||||
'method': 'update_fdb_entries'}
|
||||
@ -690,7 +677,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
@ -749,7 +735,6 @@ class TestL2PopulationRpcTestCase(test_plugin.NeutronDbPluginV2TestCase):
|
||||
{'ports':
|
||||
{'20.0.0.1': [constants.FLOODING_ENTRY,
|
||||
[p1['mac_address'],
|
||||
p1['device_owner'],
|
||||
p1_ips[0]]]},
|
||||
'network_type': 'vxlan',
|
||||
'segment_id': 1}}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user