Merge "ovs-lib: Pass string as udp port to ovsdb" into stable/pike
This commit is contained in:
commit
0515105484
|
@ -447,7 +447,7 @@ class OVSBridge(BaseOVS):
|
|||
vxlan_udp_port != p_const.VXLAN_UDP_PORT
|
||||
)
|
||||
if vxlan_uses_custom_udp_port:
|
||||
options['dst_port'] = vxlan_udp_port
|
||||
options['dst_port'] = str(vxlan_udp_port)
|
||||
options['df_default'] = str(dont_fragment).lower()
|
||||
options['remote_ip'] = remote_ip
|
||||
options['local_ip'] = local_ip
|
||||
|
|
|
@ -218,6 +218,17 @@ class OVSBridgeTestCase(OVSBridgeTestBase):
|
|||
}
|
||||
self._test_add_tunnel_port(attrs)
|
||||
|
||||
def test_add_tunnel_port_custom_port(self):
|
||||
port_name = utils.get_rand_device_name(net_helpers.PORT_PREFIX)
|
||||
self.br.add_tunnel_port(
|
||||
port_name,
|
||||
self.get_test_net_address(1),
|
||||
self.get_test_net_address(2),
|
||||
tunnel_type=const.TYPE_VXLAN,
|
||||
vxlan_udp_port=12345)
|
||||
options = self.ovs.db_get_val('Interface', port_name, 'options')
|
||||
self.assertEqual("12345", options['dst_port'])
|
||||
|
||||
def test_add_patch_port(self):
|
||||
local = utils.get_rand_device_name(net_helpers.PORT_PREFIX)
|
||||
peer = 'remotepeer'
|
||||
|
|
Loading…
Reference in New Issue