*** Settings ***
Library SSHLibrary
-Resource ../Utils.robot
*** Variables ***
${stdout} SSHLibrary.Execute Command docker exec ${docker_name} kill ${stdout} return_stdout=True return_stderr=False return_rc=False
Curl from Docker
- [Arguments] ${docker_name} ${dest_address} ${service_port}=80 ${connect_timeout}=2 ${retry}=3x ${retry_after}=1s
+ [Arguments] ${docker_name} ${dest_address} ${service_port}=80 ${connect_timeout}=2 ${retry}=5x ${retry_after}=1s
[Documentation] Sends HTTP request to remote server. Endless curl should not be running.
${output} SSHLibrary.Execute Command docker exec ${docker_name} ls | grep curl_running return_stdout=True return_stderr=False return_rc=False
Should Be Empty ${output}
Should Be Empty ${output}
${output} SSHLibrary.Execute Command docker exec ${docker_name} touch curl_running && echo success return_stdout=True return_stderr=False return_rc=False
Should Contain ${output} success
- Wait Until Keyword Succeeds ${retry} ${retry_after} Execute Curl ${docker_name} ${dest_address} ${service_port}
- ... endless="TRUE" sleep=${sleep}
+ Execute Curl ${docker_name} ${dest_address} ${service_port} endless="TRUE"
Stop Endless Curl from Docker
[Arguments] ${docker_name}
Execute Curl
[Arguments] ${docker_name} ${dest_address} ${service_port} ${endless}="FALSE" ${sleep}=1
[Documentation] Executes curl or curl loop for caller methods based on given parameters.
- ${output} SSHLibrary.Execute Command docker exec ${docker_name} curl ${dest_address}:${service_port} >/dev/null 2>&1 && echo success
+ Run Keyword If ${endless} == "TRUE" Run Keywords
+ ... SSHLibrary.Execute Command docker exec -d ${docker_name} /bin/sh -c "while [ -f curl_running ]; do curl ${dest_address}:${service_port} -m 1 && sleep ${sleep}; done"
+ ... AND Return From Keyword
+ ${output} SSHLibrary.Execute Command docker exec ${docker_name} curl ${dest_address}:${service_port} -m 5 >/dev/null 2>&1 && echo success
Should Contain ${output} success
- Run Keyword If ${endless} == "TRUE" SSHLibrary.Execute Command docker exec -d ${docker_name} /bin/sh -c "while [ -f curl_running ]; do curl ${dest_address}:${service_port} ; sleep ${sleep}; done"
- Log ${output}
Wait Until Keyword Succeeds 120s 20s Count Flows On Switch ${switch_name}
SSHLibrary.Close Connection
+Show Switch Status
+ [Arguments] ${switch_name}
+ [Documentation] Shows status of a switch for easier debugging.
+ ${stdout} ${stderr} SSHLibrary.Execute Command sudo ovs-ofctl dump-flows ${switch_name} -OOpenFlow13 return_stderr=True
+ Log ${stdout}
+ ${stdout} ${stderr} SSHLibrary.Execute Command sudo ovs-vsctl show return_stderr=True
+ Log ${stdout}
+
Count Flows On Switch
[Arguments] ${switch_name}
${out} SSHLibrary.Execute Command printf "%d" $(($(sudo ovs-ofctl dump-flows ${switch_name} -OOpenFlow13 | wc -l)-1))
--- /dev/null
+*** Settings ***
+Documentation Deep inspection of HTTP traffic on asymmetric chain.
+... Nodes are located on different VMs.
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+*** Variables ***
+
+*** Testcases ***
+Show GBPSFC1 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Start Connections
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
+
+Show GBPSFC2 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
+
+Show GBPSFC3 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
+ Close Connections
+
+Read Tenants Confing From ODL
+ [Documentation] Logs ODL data store.
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Get Request session ${GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Tenants Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Nodes Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}
+ Log ${resp.content}
+
+Read Nodes Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
+ Log ${resp.content}
+
+Read Topology Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+
+Read Topology Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
+ Log ${resp.content}
+
+Read Endpoints From ODL
+ ${resp} RequestsLibrary.Get Request session ${GBP_ENDPOINTS_API}
+ Log ${resp.content}
+ Delete All Sessions
--- /dev/null
+*** Settings ***
+Documentation Deep inspection of HTTP traffic on asymmetric chain.
+... Nodes are located on different VMs.
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+*** Variables ***
+
+*** Testcases ***
+Show GBPSFC1 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Start Connections
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
+
+Show GBPSFC2 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
+
+Show GBPSFC3 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
+ Close Connections
+
+Read Tenants Confing From ODL
+ [Documentation] Logs ODL data store.
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Get Request session ${GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Tenants Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Nodes Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}
+ Log ${resp.content}
+
+Read Nodes Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
+ Log ${resp.content}
+
+Read Topology Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+
+Read Topology Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
+ Log ${resp.content}
+
+Read Endpoints From ODL
+ ${resp} RequestsLibrary.Get Request session ${GBP_ENDPOINTS_API}
+ Log ${resp.content}
+ Delete All Sessions
--- /dev/null
+*** Settings ***
+Documentation Deep inspection of HTTP traffic on asymmetric chain.
+... Nodes are located on different VMs.
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+*** Variables ***
+
+*** Testcases ***
+Show GBPSFC1 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Start Connections
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
+
+Show GBPSFC2 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
+
+Show GBPSFC3 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
+
+Show GBPSFC4 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC4_CONNECTION
+ Show Switch Status sw4
+Show GBPSFC5 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC5_CONNECTION
+ Show Switch Status sw5
+
+Show GBPSFC6 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC6_CONNECTION
+ Show Switch Status sw6
+ Close Connections
+
+Read Tenants Confing From ODL
+ [Documentation] Logs ODL data store.
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Get Request session ${GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Tenants Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Nodes Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}
+ Log ${resp.content}
+
+Read Nodes Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
+ Log ${resp.content}
+
+Read Topology Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+
+Read Topology Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
+ Log ${resp.content}
+
+Read Endpoints From ODL
+ ${resp} RequestsLibrary.Get Request session ${GBP_ENDPOINTS_API}
+ Log ${resp.content}
+ Delete All Sessions
--- /dev/null
+*** Settings ***
+Documentation Deep inspection of HTTP traffic on asymmetric chain.
+... Nodes are located on different VMs.
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+*** Variables ***
+
+*** Testcases ***
+Show GBPSFC1 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Start Connections
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
+
+Show GBPSFC2 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
+
+Show GBPSFC3 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
+
+Show GBPSFC4 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC4_CONNECTION
+ Show Switch Status sw4
+Show GBPSFC5 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC5_CONNECTION
+ Show Switch Status sw5
+
+Show GBPSFC6 Status
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC6_CONNECTION
+ Show Switch Status sw6
+ Close Connections
+
+Read Tenants Confing From ODL
+ [Documentation] Logs ODL data store.
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ ${resp} RequestsLibrary.Get Request session ${GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Tenants Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_GBP_TENANTS_API}
+ Log ${resp.content}
+
+Read Nodes Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}
+ Log ${resp.content}
+
+Read Nodes Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
+ Log ${resp.content}
+
+Read Topology Config From ODL
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+
+Read Topology Operational From ODL
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
+ Log ${resp.content}
+
+Read Endpoints From ODL
+ ${resp} RequestsLibrary.Get Request session ${GBP_ENDPOINTS_API}
+ Log ${resp.content}
+ Delete All Sessions
GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
+GBP_ENDPOINTS_API = "/restconf/operational/endpoint:endpoints"
+GBP_BASE_ENDPOINTS_API = "/restconf/operational/base-endpoint:endpoints"
GBP_TENANTS_API = "/restconf/config/policy:tenants"
+OPERATIONAL_GBP_TENANTS_API = "/restconf/operational/policy:tenants"
GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
# LISP Flow Mapping variables