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
This commit is contained in:
parent
cada146fe3
commit
be81901b61
|
@ -462,7 +462,7 @@ class DeferredOVSBridge(object):
|
||||||
This class is not thread-safe, that's why for every use a new instance
|
This class is not thread-safe, that's why for every use a new instance
|
||||||
must be implemented.
|
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,
|
def __init__(self, br, full_ordered=False,
|
||||||
order=('add', 'mod', 'del')):
|
order=('add', 'mod', 'del')):
|
||||||
|
|
|
@ -880,6 +880,11 @@ class TestDeferredOVSBridge(base.BaseTestCase):
|
||||||
self.del_flow_dict1 = dict(in_port=31)
|
self.del_flow_dict1 = dict(in_port=31)
|
||||||
self.del_flow_dict2 = dict(in_port=32)
|
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):
|
def _verify_mock_call(self, expected_calls):
|
||||||
self.mocked_do_action_flows.assert_has_calls(expected_calls)
|
self.mocked_do_action_flows.assert_has_calls(expected_calls)
|
||||||
self.assertEqual(len(expected_calls),
|
self.assertEqual(len(expected_calls),
|
||||||
|
|
Loading…
Reference in New Issue