*** Variables ***
@{itm_created} TZA
${genius_config_dir} ${CURDIR}/../variables/genius
-${Bridge-1} BR1
-${Bridge-2} BR2
+${Bridge} ${INTEGRATION_BRIDGE}
${DEFAULT_MONITORING_INTERVAL} Tunnel Monitoring Interval (for VXLAN tunnels): 1000
@{GENIUS_DIAG_SERVICES} OPENFLOW IFM ITM DATASTORE OVSDB
${vlan} 0
${gateway-ip} 0.0.0.0
-@{PORT} BR1-eth1 BR2-eth1
+${port_name} br-int-eth1
*** Keywords ***
Genius Suite Setup
BuiltIn.Run Keyword And Ignore Error KarafKeywords.Log_Test_Suite_Start_To_Controller_Karaf
Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Log ${conn_id_1}
- Execute Command sudo ovs-vsctl add-br BR1
- Execute Command sudo ovs-vsctl set bridge BR1 protocols=OpenFlow13
- Execute Command sudo ovs-vsctl set-controller BR1 tcp:${ODL_SYSTEM_IP}:6633
- Execute Command sudo ifconfig BR1 up
- Execute Command sudo ovs-vsctl add-port BR1 tap8ed70586-6c -- set Interface tap8ed70586-6c type=tap
+ Execute Command sudo ovs-vsctl add-br ${Bridge}
+ Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
+ Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:6633
+ Execute Command sudo ifconfig ${Bridge} up
+ Execute Command sudo ovs-vsctl add-port ${Bridge} tap8ed70586-6c -- set Interface tap8ed70586-6c type=tap
Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
${output_1} Execute Command sudo ovs-vsctl show
Log ${output_1}
Set Global Variable ${conn_id_2}
Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Log ${conn_id_2}
- Execute Command sudo ovs-vsctl add-br BR2
- Execute Command sudo ovs-vsctl set bridge BR2 protocols=OpenFlow13
- Execute Command sudo ovs-vsctl set-controller BR2 tcp:${ODL_SYSTEM_IP}:6633
- Execute Command sudo ifconfig BR2 up
+ Execute Command sudo ovs-vsctl add-br ${Bridge}
+ Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
+ Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:6633
+ Execute Command sudo ifconfig ${Bridge} up
Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
${output_2} Execute Command sudo ovs-vsctl show
Log ${output_2}
Log Stop the tests
Switch Connection ${conn_id_1}
Log ${conn_id_1}
- Execute Command sudo ovs-vsctl del-br BR1
+ Execute Command sudo ovs-vsctl del-br ${Bridge}
Execute Command sudo ovs-vsctl del-manager
Write exit
close connection
Switch Connection ${conn_id_2}
Log ${conn_id_2}
- Execute Command sudo ovs-vsctl del-br BR2
+ Execute Command sudo ovs-vsctl del-br ${Bridge}
Execute Command sudo ovs-vsctl del-manager
Write exit
close connection
[Arguments] ${connection_id}
[Documentation] This keyword gets the DPN id of the switch after configuring bridges on it.It returns the captured DPN id.
Switch connection ${connection_id}
- ${cmd} set Variable sudo ovs-vsctl show | grep Bridge | awk -F "\\"" '{print $2}'
- ${Bridgename1} Execute command ${cmd}
- log ${Bridgename1}
- ${output1} Execute command sudo ovs-ofctl show -O Openflow13 ${Bridgename1} | head -1 | awk -F "dpid:" '{ print $2 }'
+ ${output1} Execute command sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
log ${output1}
# "echo \$\(\(16\#${output1}\)\) command below converts ovs dpnid (i.e., output1) from hexadecimal to decimal."
${Dpn_id} Execute command echo \$\(\(16\#${output1}\)\)
[Documentation] This will delete vtep.
${dpn_id_1} = Genius.Get Dpn Ids ${conn_id_1}
${dpn_id_2} = Genius.Get Dpn Ids ${conn_id_2}
- ${cmd} = BuiltIn.Set Variable tep:delete ${dpn_id_1} @{PORT}[0] ${vlan} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
- ${cmd2} = BuiltIn.Set Variable tep:delete ${dpn_id_2} @{PORT}[1] ${vlan} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd} = BuiltIn.Set Variable tep:delete ${dpn_id_1} ${port_name} ${vlan} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd2} = BuiltIn.Set Variable tep:delete ${dpn_id_2} ${port_name} ${vlan} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
KarafKeywords.Issue Command On Karaf Console ${cmd}
KarafKeywords.Issue Command On Karaf Console tep:commit
KarafKeywords.Issue Command On Karaf Console ${cmd2}
Genius Test Teardown
[Arguments] ${data_models} ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS}
- OVSDB.Get DumpFlows And Ovsconfig ${conn_id_1} BR1
- OVSDB.Get DumpFlows And Ovsconfig ${conn_id_2} BR2
+ OVSDB.Get DumpFlows And Ovsconfig ${conn_id_1} ${Bridge}
+ OVSDB.Get DumpFlows And Ovsconfig ${conn_id_2} ${Bridge}
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${data_models}
KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail}
ODLTools.Get All node_ip=${ODL_SYSTEM_IP} test_name=${test_name}
... ${TOOLS_SYSTEM_2_IP}
[Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
Log ${itm_created[0]},${subnet}, ${vlan}, ${Dpn_id_1},${TOOLS_SYSTEM_IP}, ${Dpn_id_2}, ${TOOLS_SYSTEM_2_IP}
- @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${Bridge-1}-eth1
- ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${Bridge-2}-eth1 ${TOOLS_SYSTEM_2_IP}
+ @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${port_name}
+ ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${port_name} ${TOOLS_SYSTEM_2_IP}
Check For Elements At URI ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]} ${Itm-no-vlan}
Check Tunnel Delete On OVS
[Documentation] This keyword returns first bridge name and UUID from list of bridges.
${result} = SSHLibrary.Execute Command sudo ovs-vsctl show
${uuid} = String.Get Line ${result} 0
- ${line} ${bridge_name} Builtin.Should Match Regexp ${result} Bridge "(\\w+)"
+ ${line} ${bridge_name} Builtin.Should Match Regexp ${result} Bridge ([\\w-]+)
[Return] ${uuid} ${bridge_name}
Delete OVS Controller
*** Variables ***
@{itm_created} TZA
${genius_config_dir} ${CURDIR}/../../variables/genius
-${Bridge-1} BR1
-${Bridge-2} BR2
${TEP_SHOW} tep:show
${TEP_SHOW_STATE} tep:show-state
${TUNNEL_MONITOR_ON} Tunnel Monitoring (for VXLAN tunnels): On
Issue Command On Karaf Console ${TEP_SHOW}
Issue Command On Karaf Console ${TEP_SHOW_STATE}
SSHLibrary.Switch Connection ${conn_id_1}
- Execute Command sudo ovs-vsctl del-controller BR1
+ Execute Command sudo ovs-vsctl del-controller ${Bridge}
SSHLibrary.Switch Connection ${conn_id_2}
- Execute Command sudo ovs-vsctl del-controller BR2
+ Execute Command sudo ovs-vsctl del-controller ${Bridge}
Issue Command On Karaf Console ${TEP_SHOW}
Issue Command On Karaf Console ${TEP_SHOW_STATE}
Wait Until Keyword Succeeds 10s 1s Verify Tunnel Status as UNKNOWN
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
SSHLibrary.Switch Connection ${conn_id_1}
- Execute Command sudo ovs-vsctl set-controller BR1 tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
+ Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
SSHLibrary.Switch Connection ${conn_id_2}
- Execute Command sudo ovs-vsctl set-controller BR2 tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
+ Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
Log "After connecting CSS with controller"
Issue Command On Karaf Console ${TEP_SHOW}
Issue Command On Karaf Console ${TEP_SHOW_STATE}
*** Variables ***
@{itm_created} TZA
${genius_config_dir} ${CURDIR}/../../variables/genius
-${Bridge-1} BR1
-${Bridge-2} BR2
-@{PORT} BR1-eth1 BR2-eth1
@{VLAN} 0 100 101
*** Test Cases ***
... ${tunnel-1} ${tunnel-type}
Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge-1} ${Bridge-2}
- ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API}
+ ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
+ ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
log ${return}
${lower-layer-if-1} Get from List ${return} 0
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge-1} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
Log ${respjson}
${type} Set Variable odl-interface:tunnel-type-vxlan
${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- ${cmd} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[0] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
- ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[0] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[0] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[0] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
KarafKeywords.Issue Command On Karaf Console ${cmd}
KarafKeywords.Issue Command On Karaf Console tep:commit
KarafKeywords.Issue Command On Karaf Console ${cmd2}
... ${tunnel-1} ${tunnel-type}
Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge-1} ${Bridge-2}
- ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API}
+ ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
+ ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
Delete and Verify VTEP IPv6 -No Vlan
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
${ipv6_2} Set Variable fd96:2a25:4ad3:3c7d:0:0:0:2000
${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/@{PORT}[0]
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/@{PORT}[1]
+ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
+ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
BuiltIn.Run Keyword And Ignore Error Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
... ${tunnel-2} ${tunnel-type}
${url_2} Set Variable ${OPERATIONAL_API}/network-topology:network-topology/
- Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge-1} ${Bridge-2} ${tunnel-1}
- ... ${tunnel-2} ${url_2}
+ Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1} ${tunnel-2}
+ ... ${url_2}
${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
log ${return}
${lower-layer-if-1} Get from List ${return} 0
Log ${respjson}
Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge-1} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
Log ${respjson}
${type} Set Variable odl-interface:tunnel-type-vxlan
${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[1] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
- ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[1] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[1] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[1] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
KarafKeywords.Issue Command On Karaf Console ${cmd1}
KarafKeywords.Issue Command On Karaf Console tep:commit
KarafKeywords.Issue Command On Karaf Console ${cmd2}
... ${tunnel-1} ${tunnel-type}
Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge-1} ${Bridge-2}
- ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API}
+ ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
+ ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
Log ${resp}
${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
log ${return}
Log ${respjson}
Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge-1} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
Log ${respjson}
${type} Set Variable odl-interface:tunnel-type-vxlan
${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[2] ${TOOLS_SYSTEM_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]}
- ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[2] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]}
+ ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[2] ${TOOLS_SYSTEM_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]}
+ ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[2] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]}
KarafKeywords.Issue Command On Karaf Console ${cmd1}
KarafKeywords.Issue Command On Karaf Console tep:commit
KarafKeywords.Issue Command On Karaf Console ${cmd2}
... ${TOOLS_SYSTEM_2_IP}
[Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
Log ${itm_created[0]},${subnet}, ${vlan}, ${Dpn_id_1},${TOOLS_SYSTEM_IP}, ${Dpn_id_2}, ${TOOLS_SYSTEM_2_IP}
- @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${Bridge-1}-eth1
- ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${Bridge-2}-eth1 ${TOOLS_SYSTEM_2_IP}
+ @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${port_name}
+ ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${port_name} ${TOOLS_SYSTEM_2_IP}
Check For Elements At URI ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]} ${Itm-no-vlan}
Get Network Topology with Tunnel
- [Arguments] ${Bridge-1} ${Bridge-2} ${tunnel-1} ${tunnel-2} ${url}
+ [Arguments] ${Bridge} ${tunnel-1} ${tunnel-2} ${url}
[Documentation] Returns the Network topology with Tunnel info in it.
- @{bridges} Create List ${Bridge-1} ${Bridge-2} ${tunnel-1} ${tunnel-2}
+ @{bridges} Create List ${Bridge} ${tunnel-1} ${tunnel-2}
Check For Elements At URI ${url} ${bridges}
Get Network Topology without Tunnel
Resource ../../libraries/OVSDB.robot
*** Variables ***
-@{PORT} BR1-eth1 BR2-eth1
${VLAN} 0
*** Test Cases ***
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- ${Port_num1} Get Port Number ${conn_id_1} ${Bridge-1} ${tunnel-1}
- ${Port_num2} Get Port Number ${conn_id_2} ${Bridge-2} ${tunnel-2}
- ${check-3} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge-1}
+ ${Port_num1} Get Port Number ${conn_id_1} ${Bridge} ${tunnel-1}
+ ${Port_num2} Get Port Number ${conn_id_2} ${Bridge} ${tunnel-2}
+ ${check-3} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge}
... ${Port_num1}
- ${check-4} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2}
+ ${check-4} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge}
... ${Port_num2}
Verify VTEP After Restarting OVS
${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2}
${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] ${VLAN} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
- ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] ${VLAN} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} ${VLAN} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
+ ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} ${VLAN} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
KarafKeywords.Issue Command On Karaf Console ${cmd1}
KarafKeywords.Issue Command On Karaf Console tep:commit
KarafKeywords.Issue Command On Karaf Console ${cmd2}
*** Variables ***
${genius_config_dir} ${CURDIR}/../../variables/genius
-${bridgename} BR1
${interface_name} l2vlan-trunk
${trunk_json} l2vlan.json
${trunk_member_json} l2vlan_member.json
@{l2vlan} create list l2vlan-trunk l2vlan transparent l2vlan true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 50 5 get operational interface ${interface_name}
- Wait Until Keyword Succeeds 40 10 table0 entry ${conn_id_1} ${bridgename}
+ Wait Until Keyword Succeeds 40 10 table0 entry ${conn_id_1} ${Bridge}
Delete l2vlan transparent interface
[Documentation] This testcase deletes the l2vlan transparent interface created between 2 dpns.
@{l2vlan} create list l2vlan-trunk l2vlan trunk tap8ed70586-6c true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 50 5 get operational interface ${interface_name}
- Wait Until Keyword Succeeds 30 10 table0 entry ${conn_id_1} ${bridgename}
+ Wait Until Keyword Succeeds 30 10 table0 entry ${conn_id_1} ${Bridge}
Create l2vlan Trunk member interface
[Documentation] This testcase creates a l2vlan Trunk member interface for the l2vlan trunk interface created in 1st testcase.
... true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 10 5 get operational interface ${l2vlan[0]}
- Wait Until Keyword Succeeds 40 10 ovs check for member interface creation ${conn_id_1} ${bridgename}
+ Wait Until Keyword Succeeds 40 10 ovs check for member interface creation ${conn_id_1} ${Bridge}
Bind service on Interface
[Documentation] This testcase binds service to the interface created .
@{bind_array} create list 2 3 VPN elan 50
... 21
Check For Elements At URI ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/ ${bind_array}
- ${command} Set Variable sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
+ ${command} Set Variable sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
Wait Until Keyword Succeeds 40 10 table entry ${command}
unbind service on interface
no table0 entry
[Documentation] After Deleting trunk interface, checking for absence of table 0 in the flow dumps
switch connection ${conn_id_1}
- ${bridgename} Set Variable BR1
- ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
+ ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
log ${ovs-check}
should not contain ${ovs-check} table=0
should not contain ${ovs-check} goto_table:17
[Arguments] ${table-id}
[Documentation] Checks for absence of no goto_table after unbinding the service on the interface.
switch connection ${conn_id_1}
- ${ovs-check1} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
+ ${ovs-check1} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
Log ${ovs-check1}
should not contain ${ovs-check1} goto_table:${table-id}
{
"dpn-id": 101,
"ip-address": "2.2.2.2",
- "portname": "BR1-eth1"
+ "portname": "br-int-eth1"
},
{
"dpn-id": 102,
"ip-address": "3.3.3.3",
- "portname": "BR2-eth1"
+ "portname": "br-int-eth1"
}
]
}