[Documentation] Delete TEPs set to use OF based Tunnels and verify.
OFT Delete Vteps using Auto Tunnels @{TOOLS_SYSTEM_ALL_IPS}
OFT Verify Vteps Deleted ${DPN_ID_LIST} ${TOOLS_SYSTEM_ALL_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 60 5 Utils.No Content From URI session ${OPERATIONAL_API}/itm-state:tunnels_state
Create and Verify single OFT TEPs
[Documentation] Create single TEPs set to use OF based Tunnels and verify.
\ ${tun_ip_list} = BuiltIn.CreateList @{tools_ip_list}
\ Collections.Remove From List ${tun_ip_list} ${tools_system_index}
\ ${ports_output} = Utils.Run Command On Remote System And Log @{tools_ip_list}[${tools_system_index}] sudo ovs-ofctl -Oopenflow13 dump-ports-desc ${Bridge}
- \ ${port_numbers} = String.Get Regexp Matches ${ports_output} (\\d+).tun.* ${1}
+ \ ${port_numbers} = String.Get Regexp Matches ${ports_output} (\\d+).of.* ${1}
\ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Ingress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
\ ... ${port_numbers}
\ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Egress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
[Arguments] ${tools_ip} ${tun_src_list} ${port_numbers}
[Documentation] Verify if Ingress flow rules are created in OVS for a given switch.
${flows_table0_output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
+ BuiltIn.Should Not Contain ${flows_table0_output} tun_src=${tools_ip},
: FOR ${tun_src} IN @{tun_src_list}
- \ BuiltIn.Should Contain ${flows_table0_output} tun_src=${tun_src}
+ \ BuiltIn.Should Contain ${flows_table0_output} tun_src=${tun_src},
: FOR ${port_number} IN @{port_numbers}
\ BuiltIn.Should Contain ${flows_table0_output} in_port=${port_number}
[Documentation] Verify if Egress flow rules are created in OVS for a given switch.
${flows_table95_output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
: FOR ${tun_dst} IN @{tun_dst_list}
- \ ${tun_dst_hex} = BuiltIn.Evaluate '0x'+binascii.hexlify(socket.inet_aton('${tun_dst}')) modules=socket,binascii
+ \ ${tun_dst_hex} = BuiltIn.Evaluate hex(struct.unpack('!I',socket.inet_aton('${tun_dst}'))[0]) modules=socket,struct
\ BuiltIn.Should Contain ${flows_table95_output} load:${tun_dst_hex}->NXM_NX_TUN_IPV4_DST[]
: FOR ${port_number} IN @{port_numbers}
\ BuiltIn.Should Contain ${flows_table95_output} output:${port_number}
OFT Verify Vteps Deleted
[Arguments] ${dpn_id_list} ${tools_ip_list}
[Documentation] Verify if OFT Vteps are created successfully or not for given Tools IPs and DPN-IDs.
- ${tools_system_len} = BuiltIn.Get Length ${dpn_id_list}
- ${tep_show_output} = BuiltIn.Wait Until Keyword Succeeds 60 5 KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
- ${tep_show_state_output} = BuiltIn.Wait Until Keyword Succeeds 60 5 KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
- ${tunnel_state_resp_data} = BuiltIn.Wait Until Keyword Succeeds 60 5 Utils.Get Data From URI session ${OPERATIONAL_API}/itm-state:tunnels_state
- : FOR ${tools_system_index} IN RANGE ${tools_system_len}
+ ${deleted_tep_len} = BuiltIn.Get Length ${dpn_id_list}
+ ${existing_tep_len} = BuiltIn.Evaluate ${NUM_TOOLS_SYSTEM}-${deleted_tep_len}
+ BuiltIn.Run Keyword If ${existing_tep_len} > 0 BuiltIn.Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up ${existing_tep_len}
+ ${tep_show_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
+ ${tep_show_state_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ : FOR ${tools_system_index} IN RANGE ${deleted_tep_len}
+ \ ${tep_show_state_output_1} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
\ BuiltIn.Should Not Contain ${tep_show_output} @{tools_ip_list}[${tools_system_index}]
\ BuiltIn.Should Not Contain ${tep_show_state_output} @{tools_ip_list}[${tools_system_index}]
- \ BuiltIn.Should Not Contain ${tunnel_state_resp_data} @{tools_ip_list}[${tools_system_index}]
\ BuiltIn.Wait Until Keyword Succeeds 60 5 Utils.No Content From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/@{dpn_id_list}[${tools_system_index}]/
\ ${dst_dpn_id_list} = BuiltIn.Create List @{DPN_ID_LIST}
\ Collections.Remove From List ${dst_dpn_id_list} ${tools_system_index}