Current Get Cluster Entity Owner For Ovsdb keyword does not work
when there is more than one ovs instance connected or the same
instance reconnects (ovs uses a different uuid).
This is a short term fix, real fix is to get the ovs uuid
just after ovs connects to controller and use this uuid to
interrogate a new implementation of the entity owner keyword.
Also changing Connect Remote System -> Connet Mininet when applies.
Change-Id: I39fcfc062e4135afd821e56a40c142c6b2f61542
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Create Bridge Manually And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Create bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
Create Bridge Manually And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Create bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
- Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-br br-s1
+ Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-br br-s1
${dictionary_operational}= Create Dictionary br-s1=5
${dictionary_config}= Create Dictionary br-s1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary_config} ${CONFIG_TOPO_API}
${dictionary_operational}= Create Dictionary br-s1=5
${dictionary_config}= Create Dictionary br-s1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary_config} ${CONFIG_TOPO_API}
Delete Bridge Manually And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Delete bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
Delete Bridge Manually And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Delete bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
- Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-br br-s1
+ Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-br br-s1
${dictionary}= Create Dictionary br-s1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary} ${OPERATIONAL_TOPO_API}
${dictionary}= Create Dictionary br-s1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary} ${OPERATIONAL_TOPO_API}
Add Port To The Manual Bridge And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Add Port in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
Add Port To The Manual Bridge And Verify
[Arguments] ${controller_index_list} ${controller_index}
[Documentation] Add Port in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
- Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
+ Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
${dictionary_operational}= Create Dictionary vx1=2
${dictionary_config}= Create Dictionary vx1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary_config} ${CONFIG_TOPO_API}
${dictionary_operational}= Create Dictionary vx1=2
${dictionary_config}= Create Dictionary vx1=0
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary_config} ${CONFIG_TOPO_API}
Log ${body}
${TOOLS_SYSTEM_IP1} Replace String ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_IP} "${TOOLS_SYSTEM_IP}"
${dictionary}= Create Dictionary ${TOOLS_SYSTEM_IP1}=1 ${OVSDBPORT}=4 ${BRIDGE}=1
Log ${body}
${TOOLS_SYSTEM_IP1} Replace String ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_IP} "${TOOLS_SYSTEM_IP}"
${dictionary}= Create Dictionary ${TOOLS_SYSTEM_IP1}=1 ${OVSDBPORT}=4 ${BRIDGE}=1
- Wait Until Keyword Succeeds 20s 1s Put And Check At URI In Cluster ${controller_index_list} ${controller_index} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE} ${body}
+ Wait Until Keyword Succeeds 20s 1s Put And Check At URI In Cluster ${controller_index_list} ${controller_index} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}
+ ... ${body}
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary} ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
Create Port Vxlan in Candidate
Wait Until Keyword Succeeds 5s 1s Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary} ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
Create Port Vxlan in Candidate
: FOR ${node} IN @{node_list}
\ ${node_id}= Get From Dictionary ${node} node-id
\ ${node_uuid}= Replace String ${node_id} ovsdb://uuid/ ${EMPTY}
: FOR ${node} IN @{node_list}
\ ${node_id}= Get From Dictionary ${node} node-id
\ ${node_uuid}= Replace String ${node_id} ovsdb://uuid/ ${EMPTY}
- \ # Since bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data, we need to
- \ # use "Run Keyword And Ignore Error" below.
+ # Since bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data, we need to
+ # use "Run Keyword And Ignore Error" below.
\ ${status} ${connection_info} Run Keyword And Ignore Error Get From Dictionary ${node} ovsdb:connection-info
\ ${status} ${remote_ip} Run Keyword And Ignore Error Get From Dictionary ${connection_info} remote-ip
\ ${uuid}= Set Variable If '${remote_ip}' == '${ovs_system_ip}' ${node_uuid} ${uuid}
\ ${status} ${connection_info} Run Keyword And Ignore Error Get From Dictionary ${node} ovsdb:connection-info
\ ${status} ${remote_ip} Run Keyword And Ignore Error Get From Dictionary ${connection_info} remote-ip
\ ${uuid}= Set Variable If '${remote_ip}' == '${ovs_system_ip}' ${node_uuid} ${uuid}
Collect OVSDB Debugs
[Arguments] ${switch}=br-int
[Documentation] Used to log useful test debugs for OVSDB related system tests.
Collect OVSDB Debugs
[Arguments] ${switch}=br-int
[Documentation] Used to log useful test debugs for OVSDB related system tests.
- ${output}= Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
+ ${output}= Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
- ${output}= Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} | cut -d',' -f3-
+ ${output}= Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} | cut -d',' -f3-
Log ${output}
Clean OVSDB Test Environment
Log ${output}
Clean OVSDB Test Environment
... tests. Not every step will always be neccessary, but should not cause any problems for
... any new ovsdb test suites.
Clean Mininet System ${tools_system}
... tests. Not every step will always be neccessary, but should not cause any problems for
... any new ovsdb test suites.
Clean Mininet System ${tools_system}
- Run Command On Remote System ${tools_system} sudo ovs-vsctl del-manager
- Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl stop
- Run Command On Remote System ${tools_system} sudo rm -rf /etc/openvswitch/conf.db
- Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl start
+ Run Command On Mininet ${tools_system} sudo ovs-vsctl del-manager
+ Run Command On Mininet ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl stop
+ Run Command On Mininet ${tools_system} sudo rm -rf /etc/openvswitch/conf.db
+ Run Command On Mininet ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl start
Delete Bridge In Candidate ${original_cluster_list} ${new_owner}
Cleans Up Test Environment For Next Suite
Delete Bridge In Candidate ${original_cluster_list} ${new_owner}
Cleans Up Test Environment For Next Suite
- [Documentation] Cleans up test environment, close existing sessions in teardown.
+ [Documentation] Cleans up test environment, close existing sessions in teardown. This step needs to be excluded
+ ... until the keyword "Get Cluster Entity Owner For Ovsdb" is fixed to search using ovs uuid as argument.
+ [Tags] exclude
Configure Exit OVSDB Connection ${original_cluster_list} ${new_owner}
Configure Exit OVSDB Connection ${original_cluster_list} ${new_owner}