Browse Source

DeferredBridge to allow add_tunnel_port passthru

The DeferredBridge should allow add_tunnel_port
method as passthrough in addition to add_port
and delete_port. L2Pop uses add_tunnel_port to
dynamically establish tunnel endpoints on cloud
nodes.

Closes-Bug: #1353885

Change-Id: I2e6d82ee79814e500604f4951e7d89eab662047a
changes/65/112565/2
Vivekanandan Narasimhan 8 years ago committed by armando-migliaccio
parent
commit
be81901b61
  1. 2
      neutron/agent/linux/ovs_lib.py
  2. 5
      neutron/tests/unit/agent/linux/test_ovs_lib.py

2
neutron/agent/linux/ovs_lib.py

@ -462,7 +462,7 @@ class DeferredOVSBridge(object):
This class is not thread-safe, that's why for every use a new instance
must be implemented.
'''
ALLOWED_PASSTHROUGHS = 'add_port', 'delete_port'
ALLOWED_PASSTHROUGHS = 'add_port', 'add_tunnel_port', 'delete_port'
def __init__(self, br, full_ordered=False,
order=('add', 'mod', 'del')):

5
neutron/tests/unit/agent/linux/test_ovs_lib.py

@ -880,6 +880,11 @@ class TestDeferredOVSBridge(base.BaseTestCase):
self.del_flow_dict1 = dict(in_port=31)
self.del_flow_dict2 = dict(in_port=32)
def test_right_allowed_passthroughs(self):
expected_passthroughs = ('add_port', 'add_tunnel_port', 'delete_port')
self.assertEqual(expected_passthroughs,
ovs_lib.DeferredOVSBridge.ALLOWED_PASSTHROUGHS)
def _verify_mock_call(self, expected_calls):
self.mocked_do_action_flows.assert_has_calls(expected_calls)
self.assertEqual(len(expected_calls),

Loading…
Cancel
Save