Fix calling of add_tunnel_port method from sanity checks module
Sanity checks functions which are checking if vxlan and geneve tunnels
are available in openvswitch are now passing all mandatory parameters
to the ovs_lib.OVSBridge.add_tunnel_port method.
Previously port_name was missing.
Closes-Bug: #1905568
Change-Id: Iae86705f1d30c89dc5482261d852b45787bd8782
(cherry picked from commit ab6c59b57e
)
This commit is contained in:
parent
4bd90a00ce
commit
e5e3b919a1
|
@ -47,16 +47,26 @@ MINIMUM_DIBBLER_VERSION = '1.0.1'
|
||||||
|
|
||||||
|
|
||||||
def ovs_vxlan_supported(from_ip='192.0.2.1', to_ip='192.0.2.2'):
|
def ovs_vxlan_supported(from_ip='192.0.2.1', to_ip='192.0.2.2'):
|
||||||
name = common_utils.get_rand_device_name(prefix='vxlantest-')
|
br_name = common_utils.get_rand_device_name(prefix='vxlantest-')
|
||||||
with ovs_lib.OVSBridge(name) as br:
|
port_name = common_utils.get_rand_device_name(prefix='vxlantest-')
|
||||||
port = br.add_tunnel_port(from_ip, to_ip, n_consts.TYPE_VXLAN)
|
with ovs_lib.OVSBridge(br_name) as br:
|
||||||
|
port = br.add_tunnel_port(
|
||||||
|
port_name=port_name,
|
||||||
|
remote_ip=from_ip,
|
||||||
|
local_ip=to_ip,
|
||||||
|
tunnel_type=n_consts.TYPE_VXLAN)
|
||||||
return port != ovs_lib.INVALID_OFPORT
|
return port != ovs_lib.INVALID_OFPORT
|
||||||
|
|
||||||
|
|
||||||
def ovs_geneve_supported(from_ip='192.0.2.3', to_ip='192.0.2.4'):
|
def ovs_geneve_supported(from_ip='192.0.2.3', to_ip='192.0.2.4'):
|
||||||
name = common_utils.get_rand_device_name(prefix='genevetest-')
|
br_name = common_utils.get_rand_device_name(prefix='genevetest-')
|
||||||
with ovs_lib.OVSBridge(name) as br:
|
port_name = common_utils.get_rand_device_name(prefix='genevetest-')
|
||||||
port = br.add_tunnel_port(from_ip, to_ip, n_consts.TYPE_GENEVE)
|
with ovs_lib.OVSBridge(br_name) as br:
|
||||||
|
port = br.add_tunnel_port(
|
||||||
|
port_name=port_name,
|
||||||
|
remote_ip=from_ip,
|
||||||
|
local_ip=to_ip,
|
||||||
|
tunnel_type=n_consts.TYPE_GENEVE)
|
||||||
return port != ovs_lib.INVALID_OFPORT
|
return port != ovs_lib.INVALID_OFPORT
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue