[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
Verify Dump Flows For Specific Table
[Arguments] ${compute_ip} ${table_num} ${flag} ${additional_args}=${EMPTY} @{matching_paras}
[Documentation] To Verify flows are present for the corresponding table Number
- ${flow_output} = Utils.Run Command On Remote System ${compute_ip} ${DUMP_FLOWS}|grep table=${table_num} ${additional_args}
+ ${flow_output} = Utils.Run Command On Remote System ${compute_ip} sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}|grep table=${table_num} ${additional_args}
Log ${flow_output}
: FOR ${matching_str} IN @{matching_paras}
\ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${flow_output} ${matching_str}
BuiltIn.Should Be True ${diff_count_ingress_port1} >= ${DEFAULT_PING_COUNT}
BuiltIn.Should Be True ${diff_count_egress_port2} >= ${DEFAULT_PING_COUNT}
BuiltIn.Should Be True ${diff_count_ingress_port2} >= ${DEFAULT_PING_COUNT}
+
+Get Flow Entries On Node
+ [Arguments] ${conn_id} ${switch}=${INTEGRATION_BRIDGE}
+ [Documentation] Return flow entries on the given Node.
+ SSHLibrary.Switch Connection ${conn_id}
+ ${output} = Utils.Write Commands Until Expected Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} ${DEFAULT_LINUX_PROMPT_STRICT}
+ BuiltIn.Log ${output}
+ [Return] ${output}
+
+Verify Ovsdb State
+ [Arguments] ${dpn_ip} ${state}=ACTIVE
+ [Documentation] Verify ovsdb state for the given DPN
+ ${output} = Utils.Run Command On Remote System And Log ${dpn_ip} sudo ovsdb-client dump -f list Open_vSwitch Controller | grep state
+ BuiltIn.Log ${output}
+ BuiltIn.Should Contain ${output} state=${state}