*** Settings ***
-Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/CompareStream.robot
-Resource ../../../libraries/Utils.robot
+Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
+
+Library RequestsLibrary
+Library SSHLibrary
+Library Collections
+Library OperatingSystem
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/CompareStream.robot
+Resource ../../../libraries/Utils.robot
+
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Init Variables
${result} To JSON ${resp.content}
Lists Should be Equal ${result} ${jsonbody}
+
*** Keywords ***
Read JSON From File
[Arguments] ${filepath}
${body} OperatingSystem.Get File ${filepath}
${jsonbody} To Json ${body}
- [Return] ${jsonbody}
+ RETURN ${jsonbody}
Init Variables Master
[Documentation] Sets variables specific to latest(master) version
*** Settings ***
-Documentation Creates/closes SSH connections to all GBP nodes. Existing connections
-... can be identified by aliases.
-Library SSHLibrary
-Resource ../../../../libraries/SSHKeywords.robot
-Resource Variables.robot
+Documentation Creates/closes SSH connections to all GBP nodes. Existing connections
+... can be identified by aliases.
+
+Library SSHLibrary
+Resource ../../../../libraries/SSHKeywords.robot
+Resource Variables.robot
+
*** Keywords ***
Start Connections
*** Settings ***
-Library SSHLibrary
-Resource Variables.robot
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../variables/Variables.py
+Library SSHLibrary
+Resource Variables.robot
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../variables/Variables.py
+
*** Keywords ***
Setup Node
[Arguments] ${GBP} ${suite_dir} ${sw_index} ${timeout}=10s
ConnUtils.Connect and Login ${GBP} timeout=${timeout}
SSHLibrary.Put File ${suite_dir}/init_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- ${stdout} ${stderr} ${rc} Execute in VE python ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_launch.py ${ODL_SYSTEM_IP} ${sw_index} timeout=${timeout}
+ ${stdout} ${stderr} ${rc} Execute in VE
+ ... python ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_launch.py ${ODL_SYSTEM_IP} ${sw_index}
+ ... timeout=${timeout}
Should Be Equal As Numbers ${rc} 0
SSHLibrary.Close Connection
Teardown Node
[Arguments] ${GBP} ${suite_dir} ${timeout}=3s
ConnUtils.Connect and Login ${GBP} timeout=${timeout}
- ${stderr} SSHLibrary.Execute Command rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_config.py return_stderr=True return_stdout=False
+ ${stderr} SSHLibrary.Execute Command
+ ... rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_config.py
+ ... return_stderr=True
+ ... return_stdout=False
Should Be Empty ${stderr}
- ${stderr} SSHLibrary.Execute Command ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/clean-demo.sh return_stderr=True return_stdout=False
+ ${stderr} SSHLibrary.Execute Command
+ ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/clean-demo.sh
+ ... return_stderr=True
+ ... return_stdout=False
Should Be Empty ${stderr}
SSHLibrary.Close Connection
*** Settings ***
-Documentation Global variables for GBPSFC 3-node topology
-Variables ../../../../variables/Variables.py
-Resource ../../../../libraries/CompareStream.robot
+Documentation Global variables for GBPSFC 3-node topology
+
+Variables ../../../../variables/Variables.py
+Resource ../../../../libraries/CompareStream.robot
+
*** Variables ***
-${VM_HOME_FOLDER} ${WORKSPACE}
-${VM_SCRIPTS_FOLDER} scripts
-${ODL} ${ODL_SYSTEM_IP}
-${GBP1} ${TOOLS_SYSTEM_IP}
-${GBP2} ${TOOLS_SYSTEM_2_IP}
-${GBP3} ${TOOLS_SYSTEM_3_IP}
-@{GBPs} ${GBP1} ${GBP2} ${GBP3}
-${TUNNELS_PATH} ${CONFIG_NODES_API}
-${ENDPOINT_REG_PATH} ${GBP_REGEP_API}
-${ENDPOINT_UNREG_PATH} ${GBP_UNREGEP_API}
-${ENDPOINTS_OPER_PATH} /restconf/operational/endpoint:endpoints
-${OF_OVERLAY_CONFIG_PATH} /restconf/config/ofoverlay:of-overlay-config
-${TUNNELS_FILE} ${CURDIR}/../../../../variables/gbp/3node/tunnels.json
+${VM_HOME_FOLDER} ${WORKSPACE}
+${VM_SCRIPTS_FOLDER} scripts
+${ODL} ${ODL_SYSTEM_IP}
+${GBP1} ${TOOLS_SYSTEM_IP}
+${GBP2} ${TOOLS_SYSTEM_2_IP}
+${GBP3} ${TOOLS_SYSTEM_3_IP}
+@{GBPs} ${GBP1} ${GBP2} ${GBP3}
+${TUNNELS_PATH} ${CONFIG_NODES_API}
+${ENDPOINT_REG_PATH} ${GBP_REGEP_API}
+${ENDPOINT_UNREG_PATH} ${GBP_UNREGEP_API}
+${ENDPOINTS_OPER_PATH} /restconf/operational/endpoint:endpoints
+${OF_OVERLAY_CONFIG_PATH} /restconf/config/ofoverlay:of-overlay-config
+${TUNNELS_FILE} ${CURDIR}/../../../../variables/gbp/3node/tunnels.json
+
*** Keywords ***
Set Test Variables
+ [Documentation] Sets variables used in 3node test cases.
[Arguments] ${client_switch_ip} ${client_docker} ${client_ip} ${client_mac} ${same_webserver_docker} ${same_webserver_ip}
... ${same_webserver_mac} ${diff_webserver_switch_ip} ${diff_webserver_docker} ${diff_webserver_ip} ${diff_webserver_mac}
- [Documentation] Sets variables used in 3node test cases.
Set Global Variable ${CLIENT_SWITCH_IP} ${client_switch_ip}
Set Global Variable ${CLIENT_DOCKER} ${client_docker}
Set Global Variable ${CLIENT_IP} ${client_ip}
*** Settings ***
-Documentation Setup/teardown for GBP 3-node topology
-Suite Setup Setup Everything
-Suite Teardown Teardown Everything
-Library SSHLibrary
-Library RequestsLibrary
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../variables/Variables.py
-Resource Variables.robot
+Documentation Setup/teardown for GBP 3-node topology
+
+Library SSHLibrary
+Library RequestsLibrary
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../variables/Variables.py
+Resource Variables.robot
+
+Suite Setup Setup Everything
+Suite Teardown Teardown Everything
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Keywords ***
Setup Everything
Log start_suite_in_3_node
Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
- Wait Until Keyword Succeeds 10x 30 s Get Data From URI session ${OF_OVERLAY_CONFIG_PATH} headers=${headers}
+ Wait Until Keyword Succeeds
+ ... 10x
+ ... 30 s
+ ... Get Data From URI
+ ... session
+ ... ${OF_OVERLAY_CONFIG_PATH}
+ ... headers=${headers}
Delete All Sessions
FOR ${GBP} IN @{GBPs}
ConnUtils.Connect and Login ${GBP} timeout=${timeout}
- ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
+ ${stderr} SSHLibrary.Execute Command
+ ... virtualenv --system-site-packages ${VE_DIR}
+ ... return_stdout=False
+ ... return_stderr=True
+ ... return_rc=False
Should Be Empty ${stderr}
- SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
+ SSHLibrary.Put File
+ ... ${CURDIR}/../../common_scripts/*
+ ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/
+ ... mode=0755
+ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE
+ ... pip freeze | grep ipaddr -q || pip install ipaddr
+ ... timeout=${timeout}
Should Be Equal As Numbers ${rc} 0
SSHLibrary.Close Connection
END
*** Settings ***
-Default Tags single-tenant setup single-tenant-setup
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBP_3node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBP_3node.robot
+
+Default Tags single-tenant setup single-tenant-setup
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Setup Suite
*** Settings ***
-Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Default Tags single-tenant setup single-tenant-setup
-Library RequestsLibrary
-Library OperatingSystem
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../Variables.robot
+Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
+
+Library RequestsLibrary
+Library OperatingSystem
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
+Default Tags single-tenant setup single-tenant-setup
-*** Variables ***
*** Test Cases ***
Put Tunnels
Register Endpoints
[Documentation] Endpoints registration
- @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_GBP1_DIR} vethl*.*json absolute
+ @{endpoint_files} OperatingSystem.List Files In Directory ${ENDPOINTS_GBP1_DIR} vethl*.*json absolute
FOR ${endpoint_file} IN @{endpoint_files}
Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
END
*** Settings ***
-Documentation Waiting until flows are created
-Default Tags single-tenant setup single-tenant-setup
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Waiting until flows are created
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Default Tags single-tenant setup single-tenant-setup
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Wait For Flows
Sleep 30s
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP1} sw1
- Run Keyword If not ${passed} Fatal Error Flows not created on sw1!
+ IF not ${passed} Fatal Error Flows not created on sw1!
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP2} sw2
- Run Keyword If not ${passed} Fatal Error Flows not created on sw2!
+ IF not ${passed} Fatal Error Flows not created on sw2!
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP3} sw3
- Run Keyword If not ${passed} Fatal Error Flows not created on sw3!
+ IF not ${passed} Fatal Error Flows not created on sw3!
*** Settings ***
-Documentation Tests for ICMP flow
-Suite Setup Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_4 same_webserver_ip=10.0.36.4
-... same_webserver_mac=00:00:00:00:36:04 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_3 diff_webserver_ip=10.0.36.3 diff_webserver_mac=00:00:00:00:36:03
-Default Tags single-tenant icmp single-tenant-main
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Tests for ICMP flow
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Suite Setup Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_4 same_webserver_ip=10.0.36.4
+... same_webserver_mac=00:00:00:00:36:04 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_3 diff_webserver_ip=10.0.36.3 diff_webserver_mac=00:00:00:00:36:03
+
+Default Tags single-tenant icmp single-tenant-main
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Same switch, ping once from h35_2 to h36_4
*** Settings ***
-Documentation Tests for HTTP flow
-Suite Setup Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_4 same_webserver_ip=10.0.36.4
-... same_webserver_mac=00:00:00:00:36:04 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_3 diff_webserver_ip=10.0.36.3 diff_webserver_mac=00:00:00:00:36:03
-Default Tags single-tenant http single-tenant-main
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Tests for HTTP flow
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Suite Setup Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_4 same_webserver_ip=10.0.36.4
+... same_webserver_mac=00:00:00:00:36:04 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_3 diff_webserver_ip=10.0.36.3 diff_webserver_mac=00:00:00:00:36:03
+
+Default Tags single-tenant http single-tenant-main
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Same switch, start SimpleHttpServer on h36_4
*** 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
+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 ***
*** Test Cases ***
Show GBPSFC1 Status
Read Tenants Confing From ODL
[Documentation] Logs ODL data store.
- Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ 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}
*** Settings ***
-Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Default Tags single-tenant teardown single-tenant-teardown
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/RestconfUtils.robot
-Resource ../Variables.robot
+Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/RestconfUtils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
+Default Tags single-tenant teardown single-tenant-teardown
-*** Variables ***
*** Test Cases ***
Delete Tenant
*** Settings ***
-Default Tags single-tenant teardown single-tenant-teardown
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBP_3node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBP_3node.robot
+
+Default Tags single-tenant teardown single-tenant-teardown
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Teardown Suite
*** Settings ***
-Default Tags multi-tenant setup multi-tenant-setup
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBP_3node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBP_3node.robot
+
+Default Tags multi-tenant setup multi-tenant-setup
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Setup Suite
*** Settings ***
-Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Default Tags multi-tenant setup multi-tenant-setup
-Library RequestsLibrary
-Library OperatingSystem
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../Variables.robot
+Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
+
+Library RequestsLibrary
+Library OperatingSystem
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
+Default Tags multi-tenant setup multi-tenant-setup
-*** Variables ***
*** Test Cases ***
Put Tunnels
Register Endpoints
[Documentation] Endpoints registration
- @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_GBP2_DIR} vethl*.*json absolute
+ @{endpoint_files} OperatingSystem.List Files In Directory ${ENDPOINTS_GBP2_DIR} vethl*.*json absolute
FOR ${endpoint_file} IN @{endpoint_files}
Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
END
*** Settings ***
-Documentation Waiting until flows are created
-Default Tags multi-tenant setup multi-tenant-setup
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Waiting until flows are created
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Default Tags multi-tenant setup multi-tenant-setup
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Wait For Flows
Sleep 30s
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP1} sw1
- Run Keyword If not ${passed} Fatal Error Flows not created on sw1!
+ IF not ${passed} Fatal Error Flows not created on sw1!
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP2} sw2
- Run Keyword If not ${passed} Fatal Error Flows not created on sw2!
+ IF not ${passed} Fatal Error Flows not created on sw2!
${passed} = Run Keyword And Return Status OpenFlowUtils.Wait For Flows On Switch ${GBP3} sw3
- Run Keyword If not ${passed} Fatal Error Flows not created on sw3!
+ IF not ${passed} Fatal Error Flows not created on sw3!
*** Settings ***
-Documentation Tests for ICMP flow
-Force Tags multi-tenant icmp multi-tenant-main
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Tests for ICMP flow
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Force Tags multi-tenant icmp multi-tenant-main
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Setting Variables For Tenant 1
[Documentation] Setting variables for tenant 1 related test cases.
- Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_3 same_webserver_ip=10.0.36.3
- ... same_webserver_mac=00:00:00:00:36:03 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_2 diff_webserver_ip=10.0.36.2 diff_webserver_mac=00:00:00:00:36:02
+ Set Test Variables
+ ... client_switch_ip=${GBP1}
+ ... client_docker=h35_2
+ ... client_ip=10.0.35.2
+ ... client_mac=00:00:00:00:35:02
+ ... same_webserver_docker=h36_3
+ ... same_webserver_ip=10.0.36.3
+ ... same_webserver_mac=00:00:00:00:36:03
+ ... diff_webserver_switch_ip=${GBP3}
+ ... diff_webserver_docker=h36_2
+ ... diff_webserver_ip=10.0.36.2
+ ... diff_webserver_mac=00:00:00:00:36:02
Tenant 1 Same switch, ping once from h35_2 to h36_3
[Documentation] Ping between endpoints located on the same switch "sw1".
Setting Variables For Tenant 2
[Documentation] Setting variables for tenant 2 related test cases.
- Set Test Variables client_switch_ip=${GBP1} client_docker=h35_8 client_ip=10.0.35.8 client_mac=00:00:00:00:35:08 same_webserver_docker=h36_6 same_webserver_ip=10.0.36.6
- ... same_webserver_mac=00:00:00:00:36:06 diff_webserver_switch_ip=${GBP2} diff_webserver_docker=h36_7 diff_webserver_ip=10.0.36.7 diff_webserver_mac=00:00:00:00:36:07
+ Set Test Variables
+ ... client_switch_ip=${GBP1}
+ ... client_docker=h35_8
+ ... client_ip=10.0.35.8
+ ... client_mac=00:00:00:00:35:08
+ ... same_webserver_docker=h36_6
+ ... same_webserver_ip=10.0.36.6
+ ... same_webserver_mac=00:00:00:00:36:06
+ ... diff_webserver_switch_ip=${GBP2}
+ ... diff_webserver_docker=h36_7
+ ... diff_webserver_ip=10.0.36.7
+ ... diff_webserver_mac=00:00:00:00:36:07
Tenant 2 Same switch, ping once from h35_8 to h36_6
[Documentation] Same switch (sw1)
*** Settings ***
-Documentation Tests for HTTP flow
-Force Tags multi-tenant http multi-tenant-main
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
+Documentation Tests for HTTP flow
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+
+Force Tags multi-tenant http multi-tenant-main
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Setting Variables for Tenant 1
[Documentation] Setting variables for test cases related to tenant 1.
# Same subnet tests are not supported by current topology configuration;
# clients and webservers are put in two different subnets
- Set Test Variables client_switch_ip=${GBP1} client_docker=h35_2 client_ip=10.0.35.2 client_mac=00:00:00:00:35:02 same_webserver_docker=h36_3 same_webserver_ip=10.0.36.3
- ... same_webserver_mac=00:00:00:00:36:03 diff_webserver_switch_ip=${GBP3} diff_webserver_docker=h36_2 diff_webserver_ip=10.0.36.2 diff_webserver_mac=00:00:00:00:36:02
+ Set Test Variables
+ ... client_switch_ip=${GBP1}
+ ... client_docker=h35_2
+ ... client_ip=10.0.35.2
+ ... client_mac=00:00:00:00:35:02
+ ... same_webserver_docker=h36_3
+ ... same_webserver_ip=10.0.36.3
+ ... same_webserver_mac=00:00:00:00:36:03
+ ... diff_webserver_switch_ip=${GBP3}
+ ... diff_webserver_docker=h36_2
+ ... diff_webserver_ip=10.0.36.2
+ ... diff_webserver_mac=00:00:00:00:36:02
Tenant 1 Same switch, start SimpleHttpServer on h36_3
[Documentation] Same Switch (sw1)
Setting Variables For Tenant 2
[Documentation] Setting variables for test cases related to tenant 1.
- Set Test Variables client_switch_ip=${GBP1} client_docker=h35_8 client_ip=10.0.35.8 client_mac=00:00:00:00:35:08 same_webserver_docker=h36_6 same_webserver_ip=10.0.36.6
- ... same_webserver_mac=00:00:00:00:36:06 diff_webserver_switch_ip=${GBP2} diff_webserver_docker=h36_7 diff_webserver_ip=10.0.36.7 diff_webserver_mac=00:00:00:00:36:07
+ Set Test Variables
+ ... client_switch_ip=${GBP1}
+ ... client_docker=h35_8
+ ... client_ip=10.0.35.8
+ ... client_mac=00:00:00:00:35:08
+ ... same_webserver_docker=h36_6
+ ... same_webserver_ip=10.0.36.6
+ ... same_webserver_mac=00:00:00:00:36:06
+ ... diff_webserver_switch_ip=${GBP2}
+ ... diff_webserver_docker=h36_7
+ ... diff_webserver_ip=10.0.36.7
+ ... diff_webserver_mac=00:00:00:00:36:07
Tenant 2 Same switch, start SimpleHttpServer on h36_6
[Documentation] Same Switch (sw1)
*** 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
+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 ***
*** Test Cases ***
Show GBPSFC1 Status
Read Tenants Confing From ODL
[Documentation] Logs ODL data store.
- Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ 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}
*** Settings ***
-Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Default Tags multi-tenant teardown multi-tenant-teardown
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/RestconfUtils.robot
-Resource ../Variables.robot
+Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/RestconfUtils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
+Default Tags multi-tenant teardown multi-tenant-teardown
-*** Variables ***
*** Test Cases ***
Delete Tenants
*** Settings ***
-Default Tags multi-tenant teardown multi-tenant-teardown
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBP_3node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBP_3node.robot
+
+Default Tags multi-tenant teardown multi-tenant-teardown
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Teardown Suite
*** Settings ***
-Documentation This suite verifies availability of ODL features needed for further testing
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library OperatingSystem
-Library RequestsLibrary
-Resource Variables.robot
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/DevstackUtils.robot
-Variables ../../../../variables/Variables.py
+Documentation This suite verifies availability of ODL features needed for further testing
+
+Library SSHLibrary
+Library OperatingSystem
+Library RequestsLibrary
+Resource Variables.robot
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/DevstackUtils.robot
+Variables ../../../../variables/Variables.py
+
+Suite Teardown Delete All Sessions
-*** Variables ***
*** Test Cases ***
Wait for Renderers and NeutronMapper
Wait Until Keyword Succeeds 60x 5s Renderers And NeutronMapper Initialized session
Delete All Sessions
+
*** Keywords ***
Renderers And NeutronMapper Initialized
- [Arguments] ${session}
[Documentation] Ofoverlay and Neutronmapper features start check via datastore.
+ [Arguments] ${session}
Get Data From URI ${session} ${OF_OVERLAY_BOOT_URL} headers=${headers}
${response} RequestsLibrary.Get Request ${session} ${NEURONMAPPER_BOOT_URL} ${headers}
Should Be Equal As Strings 404 ${response.status_code}
*** Settings ***
-Documentation Testing of Group Based Policy Neutron-Mapper
-Suite Setup Devstack Suite Setup
-Suite Teardown Clean Suite
-Library SSHLibrary
-Library OperatingSystem
-Library RequestsLibrary
-Library String
-Resource Variables.robot
-Resource ../../../../variables/gbp/Constants.robot
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/GBP/RestconfUtils.robot
-Resource ../../../../libraries/GBP/AssertionUtils.robot
-Resource ../../../../libraries/DevstackUtils.robot
-Resource ../../../../libraries/OpenStackOperations.robot
+Documentation Testing of Group Based Policy Neutron-Mapper
+
+Library SSHLibrary
+Library OperatingSystem
+Library RequestsLibrary
+Library String
+Resource Variables.robot
+Resource ../../../../variables/gbp/Constants.robot
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/GBP/RestconfUtils.robot
+Resource ../../../../libraries/GBP/AssertionUtils.robot
+Resource ../../../../libraries/DevstackUtils.robot
+Resource ../../../../libraries/OpenStackOperations.robot
+
+Suite Setup Devstack Suite Setup
+Suite Teardown Clean Suite
+
*** Variables ***
-${NETWORK_NAME} net123
-${SUBNET_NAME} subnet123
-${CLIENT_SG} client_sg
-${SERVER_SG} server_sg
+${NETWORK_NAME} net123
+${SUBNET_NAME} subnet123
+${CLIENT_SG} client_sg
+${SERVER_SG} server_sg
${TENANTS_CONF_PATH} restconf/config/policy:tenants
-${CLIENT_PORT_IP} 10.0.0.5
-${SERVER_PORT_IP} 10.0.0.6
-${CLIENT_PORT_NAME} client
-${SERVER_PORT_NAME} server
-${REMOTE_IP_PREFIX} 10.0.0.0/24
-${SUBNET_IP_PREFIX} 10.0.0.0/24
-${ROUTER_NAME} router123
-${TENANT_ID} ${EMPTY}
-${SUBNET_ID} ${EMPTY}
-${FLOOD_DOMAIN_ID} ${EMPTY}
-${BRIDGE_DOMAIN_ID} ${EMPTY}
-${L3_CONTEXT_ID} ${EMPTY}
-${GROUP_RULE_ID} ${EMPTY}
-${CLIENT_MAC_ADDR} ${EMPTY}
-${SERVER_MAC_ADDR} ${EMPTY}
-${CLIENT_SG_ID} ${EMPTY}
-${SERVER_SG_ID} ${EMPTY}
-${ROUTER_ID} ${EMPTY}
+${CLIENT_PORT_IP} 10.0.0.5
+${SERVER_PORT_IP} 10.0.0.6
+${CLIENT_PORT_NAME} client
+${SERVER_PORT_NAME} server
+${REMOTE_IP_PREFIX} 10.0.0.0/24
+${SUBNET_IP_PREFIX} 10.0.0.0/24
+${ROUTER_NAME} router123
+${TENANT_ID} ${EMPTY}
+${SUBNET_ID} ${EMPTY}
+${FLOOD_DOMAIN_ID} ${EMPTY}
+${BRIDGE_DOMAIN_ID} ${EMPTY}
+${L3_CONTEXT_ID} ${EMPTY}
+${GROUP_RULE_ID} ${EMPTY}
+${CLIENT_MAC_ADDR} ${EMPTY}
+${SERVER_MAC_ADDR} ${EMPTY}
+${CLIENT_SG_ID} ${EMPTY}
+${SERVER_SG_ID} ${EMPTY}
+${ROUTER_ID} ${EMPTY}
+
*** Test Cases ***
Test Resolve Tenant ID
[Documentation] Test reading tenant id from default security group
${tenant_id} Get Tenant ID From Security Group
- ${tenant_id}= To Uuid ${tenant_id}
+ ${tenant_id} To Uuid ${tenant_id}
Should Match Regexp ${tenant_id} ${UUID_PATTERN}
Set Global Variable ${TENANT_ID} ${tenant_id}
Set Global Variable ${BRIDGE_DOMAIN_ID} ${l2_bd_id}
Set Global Variable ${L3_CONTEXT_ID} ${l3_ctx_id}
+
*** Keywords ***
Create Neutron Entity And Return ID
- [Arguments] ${cmd} ${pattern}=${UUID_PATTERN}
[Documentation] Designed for creating neutron entities and returing their IDs.
+ [Arguments] ${cmd} ${pattern}=${UUID_PATTERN}
${output} Write Commands Until Prompt ${cmd} | grep -w id | awk '{print $4}'
Should Not Be Empty ${output}
${id} Should Match Regexp ${output} ${pattern}
- [Return] ${id}
+ RETURN ${id}
To Uuid
- [Arguments] ${init_string}
[Documentation] Insert dashes if missing to generate proper UUID string.
+ [Arguments] ${init_string}
Should Match Regexp ${init_string} ${UUID_NO_DASHES}
${first} Get Substring ${init_string} 0 8
${second} Get Substring ${init_string} 8 12
${third} Get Substring ${init_string} 12 16
${fourth} Get Substring ${init_string} 16 20
${fifth} Get Substring ${init_string} 20 32
- [Return] ${first}-${second}-${third}-${fourth}-${fifth}
+ RETURN ${first}-${second}-${third}-${fourth}-${fifth}
Clean Suite
[Documentation] Clears Openstack. This is also helpful when debugging tests locally.
*** Settings ***
-Documentation Global variables for GBPSFC 6node topology. Some variables are release specific and their value depend on
-... ODL_STREAM variable which contains release name and is defined in Jenkins job. Keywords for setting release specific
-... data are located in this file.
-Variables ../../../../variables/Variables.py
+Documentation Global variables for GBPSFC 6node topology. Some variables are release specific and their value depend on
+... ODL_STREAM variable which contains release name and is defined in Jenkins job. Keywords for setting release specific
+... data are located in this file.
+
+Variables ../../../../variables/Variables.py
+
*** Variables ***
${NEURONMAPPER_BOOT_URL} restconf/config/neutron-mapper:mappings
-${OF_OVERLAY_BOOT_URL} restconf/config/ofoverlay:of-overlay-config
-${PROMPT_TIMEOUT} ${DEFAULT_TIMEOUT}
-${DEVSTACK_BRANCH} ${OPENSTACK_BRANCH}
-${DEVSTACK_IP} ${TOOLS_SYSTEM_IP}
-${DEVSTACK_USER} ${TOOLS_SYSTEM_USER}
-${DEVSTACK_PROMPT} ${DEFAULT_LINUX_PROMPT}
+${OF_OVERLAY_BOOT_URL} restconf/config/ofoverlay:of-overlay-config
+${PROMPT_TIMEOUT} ${DEFAULT_TIMEOUT}
+${DEVSTACK_BRANCH} ${OPENSTACK_BRANCH}
+${DEVSTACK_IP} ${TOOLS_SYSTEM_IP}
+${DEVSTACK_USER} ${TOOLS_SYSTEM_USER}
+${DEVSTACK_PROMPT} ${DEFAULT_LINUX_PROMPT}
# modify the below var for local testing
-${DEVSTACK_DIR} ${DEVSTACK_DEPLOY_PATH}
+${DEVSTACK_DIR} ${DEVSTACK_DEPLOY_PATH}
# modify the below var for local testing
-${DEVSTACK_PWD} ${EMPTY}
+${DEVSTACK_PWD} ${EMPTY}
*** Settings ***
-Library SSHLibrary
-Resource ../../../../libraries/SSHKeywords.robot
-Resource ../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../variables/Variables.py
-Resource Variables.robot
+Library SSHLibrary
+Resource ../../../../libraries/SSHKeywords.robot
+Resource ../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../variables/Variables.py
+Resource Variables.robot
+
*** Keywords ***
Start Connections
*** Settings ***
-Library SSHLibrary
-Resource Variables.robot
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../variables/Variables.py
+Library SSHLibrary
+Resource Variables.robot
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../variables/Variables.py
+
*** Keywords ***
Setup Node
- [Arguments] ${GBPSFC} ${sw_index} ${suite_dir} ${timeout}=10s
[Documentation] Configures underlying infrastructure composed of Docker containers and OVS switches on remote VM.
... Python and Bash scripts are used.
+ [Arguments] ${GBPSFC} ${sw_index} ${suite_dir} ${timeout}=10s
ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
SSHLibrary.Put File ${suite_dir}/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- ${stdout} ${stderr} ${rc} Execute in VE python ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_launch.py ${ODL} ${sw_index} timeout=${timeout}
+ ${stdout} ${stderr} ${rc} Execute in VE
+ ... python ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_launch.py ${ODL} ${sw_index}
+ ... timeout=${timeout}
Should Be Equal As Numbers ${rc} 0
${stderr} Set Variable
# Flows for GBPSFC3 and GBPSFC5 have to be written manually.
# GBPSFC2 is SFF for GBPSFC3 and GBPSFC4 is SFF for GBPSFC5
- Run Keyword If "${GBPSFC}" == "${GBPSFC3}" Write SF Flows ${GBPSFC2} ${stderr}
- ... ELSE IF "${GBPSFC}" == "${GBPSFC5}" Write SF Flows ${GBPSFC4} ${stderr}
+ IF "${GBPSFC}" == "${GBPSFC3}"
+ Write SF Flows ${GBPSFC2} ${stderr}
+ ELSE IF "${GBPSFC}" == "${GBPSFC5}"
+ Write SF Flows ${GBPSFC4} ${stderr}
+ END
Should Be Empty ${stderr}
SSHLibrary.Close Connection
Write SF Flows
- [Arguments] ${SFF} ${stderr}
[Documentation] Writes flows to SF node. SFF for given SF has to be specified in arguments.
- ${stderr} SSHLibrary.Execute Command ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/sf-flows.sh ${SFF} return_stderr=True return_stdout=False
+ [Arguments] ${SFF} ${stderr}
+ ${stderr} SSHLibrary.Execute Command
+ ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/sf-flows.sh ${SFF}
+ ... return_stderr=True
+ ... return_stdout=False
Teardown Node
- [Arguments] ${GBPSFC} ${suite_dir} ${timeout}=3s
[Documentation] Clears underlying infrastructure composed of Docker containers and OVS switches from remote VM.
... Python and Bash scripts are used.
+ [Arguments] ${GBPSFC} ${suite_dir} ${timeout}=3s
ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
- ${stderr} SSHLibrary.Execute Command rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_config.py return_stderr=True return_stdout=False
+ ${stderr} SSHLibrary.Execute Command
+ ... rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_config.py
+ ... return_stderr=True
+ ... return_stdout=False
Should Be Empty ${stderr}
- ${stderr} SSHLibrary.Execute Command rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/sf-flows.sh return_stderr=True return_stdout=False
+ ${stderr} SSHLibrary.Execute Command
+ ... rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/sf-flows.sh
+ ... return_stderr=True
+ ... return_stdout=False
Should Be Empty ${stderr}
- ${stderr} SSHLibrary.Execute Command ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/clean-demo.sh return_stderr=True return_stdout=False
+ ${stderr} SSHLibrary.Execute Command
+ ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/clean-demo.sh
+ ... return_stderr=True
+ ... return_stdout=False
Should Be Empty ${stderr}
SSHLibrary.Close Connection
*** Settings ***
-Documentation Global variables for GBPSFC 6node topology. Some variables are release specific and their value depend on
-... ODL_STREAM variable which contains release name and is defined in Jenkins job. Keywords for setting release specific
-... data are located in this file.
-Variables ../../../../variables/Variables.py
-Resource ../../../../libraries/CompareStream.robot
+Documentation Global variables for GBPSFC 6node topology. Some variables are release specific and their value depend on
+... ODL_STREAM variable which contains release name and is defined in Jenkins job. Keywords for setting release specific
+... data are located in this file.
+
+Variables ../../../../variables/Variables.py
+Resource ../../../../libraries/CompareStream.robot
+
*** Variables ***
-${VM_HOME_FOLDER} ${WORKSPACE}
-${VM_SCRIPTS_FOLDER} scripts
-${ODL} ${ODL_SYSTEM_IP}
-${GBPSFC1} ${TOOLS_SYSTEM_IP}
-${GBPSFC2} ${TOOLS_SYSTEM_2_IP}
-${GBPSFC3} ${TOOLS_SYSTEM_3_IP}
-${GBPSFC4} ${TOOLS_SYSTEM_4_IP}
-${GBPSFC5} ${TOOLS_SYSTEM_5_IP}
-${GBPSFC6} ${TOOLS_SYSTEM_6_IP}
-@{GBPSFCs} ${GBPSFC1} ${GBPSFC2} ${GBPSFC3} ${GBPSFC4} ${GBPSFC5} ${GBPSFC6}
-${OF_OVERLAY_CONFIG_PATH} /restconf/config/ofoverlay:of-overlay-config
-${TOPOLOGY_PATH} ${CONFIG_TOPO_API}/topology/ovsdb:1
-${SF_PATH} /restconf/config/service-function:service-functions
-${SF_FILE} ${CURDIR}/../../../../variables/gbp/6node/service_functions.json
-${SFF_PATH} /restconf/config/service-function-forwarder:service-function-forwarders
-${SFF_FILE} ${CURDIR}/../../../../variables/gbp/6node/service_function_forwarders.json
-${SFC_PATH} /restconf/config/service-function-chain:service-function-chains
-${TUNNELS_PATH} ${CONFIG_NODES_API}
-${TUNNELS_FILE} ${CURDIR}/../../../../variables/gbp/6node/tunnels.json
-${SFC_ASYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/service_function_chains.json
-${SFC_SYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/service_function_chains.json
-${SFP_PATH} /restconf/config/service-function-path:service-function-paths
-${SFP_ASYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/service_function_paths.json
-${SFP_SYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/service_function_paths.json
-${ENDPOINT_REG_PATH} ${GBP_REGEP_API}
-${ENDPOINT_UNREG_PATH} ${GBP_UNREGEP_API}
-${ENDPOINTS_OPER_PATH} /restconf/operational/endpoint:endpoints
+${VM_HOME_FOLDER} ${WORKSPACE}
+${VM_SCRIPTS_FOLDER} scripts
+${ODL} ${ODL_SYSTEM_IP}
+${GBPSFC1} ${TOOLS_SYSTEM_IP}
+${GBPSFC2} ${TOOLS_SYSTEM_2_IP}
+${GBPSFC3} ${TOOLS_SYSTEM_3_IP}
+${GBPSFC4} ${TOOLS_SYSTEM_4_IP}
+${GBPSFC5} ${TOOLS_SYSTEM_5_IP}
+${GBPSFC6} ${TOOLS_SYSTEM_6_IP}
+@{GBPSFCs} ${GBPSFC1} ${GBPSFC2} ${GBPSFC3} ${GBPSFC4} ${GBPSFC5} ${GBPSFC6}
+${OF_OVERLAY_CONFIG_PATH} /restconf/config/ofoverlay:of-overlay-config
+${TOPOLOGY_PATH} ${CONFIG_TOPO_API}/topology/ovsdb:1
+${SF_PATH} /restconf/config/service-function:service-functions
+${SF_FILE} ${CURDIR}/../../../../variables/gbp/6node/service_functions.json
+${SFF_PATH} /restconf/config/service-function-forwarder:service-function-forwarders
+${SFF_FILE} ${CURDIR}/../../../../variables/gbp/6node/service_function_forwarders.json
+${SFC_PATH} /restconf/config/service-function-chain:service-function-chains
+${TUNNELS_PATH} ${CONFIG_NODES_API}
+${TUNNELS_FILE} ${CURDIR}/../../../../variables/gbp/6node/tunnels.json
+${SFC_ASYMM_FILE}
+... ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/service_function_chains.json
+${SFC_SYMM_FILE}
+... ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/service_function_chains.json
+${SFP_PATH} /restconf/config/service-function-path:service-function-paths
+${SFP_ASYMM_FILE}
+... ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/service_function_paths.json
+${SFP_SYMM_FILE}
+... ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/service_function_paths.json
+${ENDPOINT_REG_PATH} ${GBP_REGEP_API}
+${ENDPOINT_UNREG_PATH} ${GBP_UNREGEP_API}
+${ENDPOINTS_OPER_PATH} /restconf/operational/endpoint:endpoints
+
*** Keywords ***
Set Test Variables
+ [Documentation] Sets variables used in 6node test cases.
[Arguments] ${client_ip} ${client_name} ${server_ip} ${server_name} ${ether_type} ${proto}
... ${service_port}=${EMPTY} ${vxlan_port}=${EMPTY} ${vxlan_gpe_port}=${EMPTY}
- [Documentation] Sets variables used in 6node test cases.
Set Global Variable ${CLIENT_IP} ${client_ip}
Set Global Variable ${CLIENT_NAME} ${client_name}
Set Global Variable ${SERVER_IP} ${server_ip}
[Documentation] Sets variables specific to latest(master) version
Set Global Variable ${GBP_TENANT_ID} tenant-red
Set Global Variable ${TENANT_PATH} ${GBP_TENANTS_API}/tenant/${GBP_TENANT_ID}
- Set Global Variable ${TENANT_ASYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/master/tenants.json
- Set Global Variable ${TENANT_SYMM_FILE} ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/master/tenants.json
- Set Global Variable ${SFF_FILE} ${CURDIR}/../../../../variables/gbp/6node/master/service_function_forwarders.json
- Set Global Variable ${ENDPOINTS_ASYMM_DIR} ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/master/
- Set Global Variable ${ENDPOINTS_SYMM_DIR} ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/master/
+ Set Global Variable
+ ... ${TENANT_ASYMM_FILE}
+ ... ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/master/tenants.json
+ Set Global Variable
+ ... ${TENANT_SYMM_FILE}
+ ... ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/master/tenants.json
+ Set Global Variable
+ ... ${SFF_FILE}
+ ... ${CURDIR}/../../../../variables/gbp/6node/master/service_function_forwarders.json
+ Set Global Variable
+ ... ${ENDPOINTS_ASYMM_DIR}
+ ... ${CURDIR}/../../../../variables/gbp/6node/demo-asymmetric-chain/master/
+ Set Global Variable
+ ... ${ENDPOINTS_SYMM_DIR}
+ ... ${CURDIR}/../../../../variables/gbp/6node/demo-symmetric-chain/master/
*** Settings ***
-Documentation Setup/teardown for GBPSFC 6-node topology
-Suite Setup Setup Everything
-Suite Teardown Teardown Everything
-Library SSHLibrary
-Library RequestsLibrary
-Resource ../../../../libraries/Utils.robot
-Resource ../../../../libraries/GBP/ConnUtils.robot
-Resource Variables.robot
-Variables ../../../../variables/Variables.py
+Documentation Setup/teardown for GBPSFC 6-node topology
+
+Library SSHLibrary
+Library RequestsLibrary
+Resource ../../../../libraries/Utils.robot
+Resource ../../../../libraries/GBP/ConnUtils.robot
+Resource Variables.robot
+Variables ../../../../variables/Variables.py
+
+Suite Setup Setup Everything
+Suite Teardown Teardown Everything
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Keywords ***
Setup Everything
[Documentation] Initial setup of remote VM. Copying of scripts and installation python packages to virtual env if missing.
Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
- Wait Until Keyword Succeeds 10x 30 s Get Data From URI session ${OF_OVERLAY_CONFIG_PATH} headers=${headers}
+ Wait Until Keyword Succeeds
+ ... 10x
+ ... 30 s
+ ... Get Data From URI
+ ... session
+ ... ${OF_OVERLAY_CONFIG_PATH}
+ ... headers=${headers}
Delete All Sessions
FOR ${GBPSFC} IN @{GBPSFCs}
ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
# TODO if something extra needs to be installed, please do it in virt-env
- ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
+ ${stderr} SSHLibrary.Execute Command
+ ... virtualenv --system-site-packages ${VE_DIR}
+ ... return_stdout=False
+ ... return_stderr=True
+ ... return_rc=False
Should Be Empty ${stderr}
- SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
+ SSHLibrary.Put File
+ ... ${CURDIR}/../../common_scripts/*
+ ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/
+ ... mode=0755
+ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE
+ ... pip freeze | grep ipaddr -q || pip install ipaddr
+ ... timeout=${timeout}
Should Be Equal As Numbers ${rc} 0
SSHLibrary.Close Connection
END
*** Settings ***
-Resource ../Variables.robot
-Resource ../GBPSFC_6node.robot
+Resource ../Variables.robot
+Resource ../GBPSFC_6node.robot
+
*** Test Cases ***
Initialize Nodes
*** Settings ***
-Documentation Waiting for manager and switch connections.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Waiting for manager and switch connections.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Wait For Manager Connected on GBPSFC2
*** Settings ***
-Documentation Test suite for setting up infrastructure for demo-asymmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Library OperatingSystem
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/SSHKeywords.robot
-Resource ../Variables.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Documentation Test suite for setting up infrastructure for demo-asymmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/SSHKeywords.robot
+Resource ../Variables.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Put Service Functions
Register Endpoints
[Documentation] Endpoints registration
- @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute
+ @{endpoint_files} OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute
FOR ${endpoint_file} IN @{endpoint_files}
Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
END
*** Settings ***
-Documentation Documentation Waiting for flows to appear on switches.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Documentation Waiting for flows to appear on switches.
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Wait For Flows on GBPSFC1
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM in different subnets and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM in different subnets and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping Once from h35_2 to h36_2
[Documentation] Test icmp request.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h36_2
+ ... server_ip=10.0.36.2
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC1_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h35_2 to h36_2 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h36_2 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h35_2 to h36_2
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM in the same subnet and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM in the same subnet and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping Once from h35_2 to h35_3
[Documentation] Test icmp request.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h35_3 server_ip=10.0.35.3 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h35_3
+ ... server_ip=10.0.35.3
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC1_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h35_2 to h35_3 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=5 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=5
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h35_3 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=5 out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=5
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h35_2 to h35_3
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM, in different subnets and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM, in different subnets and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping from h36_4 to h35_4
[Documentation] Test icmp request.
- Set Test Variables client_name=h36_4 client_ip=10.0.36.4 server_name=h35_4 server_ip=10.0.35.4 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h36_4
+ ... client_ip=10.0.36.4
+ ... server_name=h35_4
+ ... server_ip=10.0.35.4
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC6_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h36_4 to h35_4 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=4 eth_type=0x0800 inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=4
+ ... eth_type=0x0800
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h35_4 to h36_4 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=6 eth_type=0x0800 inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=6
+ ... eth_type=0x0800
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h36_4 to h35_4
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on different VMs in different subnets and are members of different EPGs.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on different VMs in different subnets and are members of different EPGs.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping from h36_5 to h35_2
[Documentation] Test icmp request.
- Set Test Variables client_name=h36_5 client_ip=10.0.36.5 server_name=h35_2 server_ip=10.0.35.2 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h36_5
+ ... client_ip=10.0.36.5
+ ... server_name=h35_2
+ ... server_ip=10.0.35.2
+ ... ether_type=0x0800
+ ... proto=1
... vxlan_port=3
Switch Connection GPSFC6_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h36_5 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=7 out_port=${VXLAN_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC1} proto=${PROTO}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=7
+ ... out_port=${VXLAN_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... proto=${PROTO}
Find ICMP Req from h36_5 to h35_2 on GBPSFC1
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_PORT} out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC6}
- ... outer_dst_ip=${GBPSFC1} proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_PORT}
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC6}
+ ... outer_dst_ip=${GBPSFC1}
+ ... proto=${PROTO}
Find ICMP Resp from h35_2 to h36_5 on GBPSFC1
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... next_hop_ip=${GBPSFC6} proto=${PROTO}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=${VXLAN_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC6}
+ ... proto=${PROTO}
Find ICMP Resp from h35_2 to h36_5 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_PORT} out_port=7 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC1}
- ... outer_dst_ip=${GBPSFC6} proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_PORT}
+ ... out_port=7
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC6}
+ ... proto=${PROTO}
Stop Endless Ping from h36_5 to h35_2
[Documentation] Stoping of endless pinging after traffic inspection finishes.
*** Settings ***
-Documentation Deep inspection of HTTP traffic on asymmetric chain.
-... Nodes are located on the same VM.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
-
-*** Variables ***
+Documentation Deep inspection of HTTP traffic on asymmetric chain.
+... Nodes are located on the same VM.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Start HTTP on h36_2 on Port 80
[Documentation] Starting HTTP service on docker container.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2 service_port=80 ether_type=0x0800
- ... proto=6 vxlan_gpe_port=2
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h36_2
+ ... server_ip=10.0.36.2
+ ... service_port=80
+ ... ether_type=0x0800
+ ... proto=6
+ ... vxlan_gpe_port=2
Switch Connection GPSFC1_CONNECTION
Start HTTP Service on Docker ${SERVER_NAME} ${SERVICE_PORT}
On GBPSFC1 Send HTTP req h35_2-h36_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... dst_port=${SERVICE_PORT}
${nsp_35_2-nsp_36_2} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP} ${nsp_35_2-nsp_36_2}
On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP req h35_2-h36_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP}
+ ... received_nsi=255
On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP req h35_2-h36_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP}
+ ... received_nsi=254
On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC1
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC1} nsp=${NSP} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... nsp=${NSP}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP req h35_2-h36_2 to h36_2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC4}
- ... outer_dst_ip=${GBPSFC1} nsp=${NSP} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC1}
+ ... nsp=${NSP}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP resp h36_2-h35_2 to h35_2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... proto=${PROTO} src_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... proto=${PROTO}
+ ... src_port=${SERVICE_PORT}
Stop Endless Curl on h36_2 on port 80
[Documentation] Stopping endless HTTP session after traffic inspection finishes.
*** Settings ***
-Documentation Deep inspection of HTTP traffic on asymmetric chain.
-... Nodes are located on different VMs.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
-
-*** Variables ***
+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
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Start HTTP on h36_4 on Port 80
[Documentation] Starting HTTP service on docker container.
- Set Test Variables client_name=h35_3 client_ip=10.0.35.3 server_name=h36_4 server_ip=10.0.36.4 service_port=80 ether_type=0x0800
- ... proto=6 vxlan_gpe_port=2 vxlan_port=3
+ Set Test Variables
+ ... client_name=h35_3
+ ... client_ip=10.0.35.3
+ ... server_name=h36_4
+ ... server_ip=10.0.36.4
+ ... service_port=80
+ ... ether_type=0x0800
+ ... proto=6
+ ... vxlan_gpe_port=2
+ ... vxlan_port=3
Switch Connection GPSFC6_CONNECTION
Start HTTP Service on Docker ${SERVER_NAME} ${SERVICE_PORT}
On GBPSFC1 Send HTTP req h35_3-h36_4 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=5 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=5
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... dst_port=${SERVICE_PORT}
${nsp_35_3-nsp_36_4} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP} ${nsp_35_3-nsp_36_4}
On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP req h35_3-h36_4 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP}
+ ... received_nsi=255
On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP req h35_3-h36_4 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP}
+ ... received_nsi=254
On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC6
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC6} nsp=${NSP} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC6}
+ ... nsp=${NSP}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC6 Send HTTP req h35_3-h36_4 to h36_4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC6_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC4}
- ... outer_dst_ip=${GBPSFC6} nsp=${NSP} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC6}
+ ... nsp=${NSP}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC6 Send HTTP resp h36_4-h35_3 to GBPSFC1
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=${VXLAN_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... next_hop_ip=${GBPSFC1} proto=${PROTO} src_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=${VXLAN_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... proto=${PROTO}
+ ... src_port=${SERVICE_PORT}
On GBPSFC1 Send HTTP resp h36_4-h35_3 to h35_3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_PORT} out_port=5 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC6}
- ... outer_dst_ip=${GBPSFC1} proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_PORT}
+ ... out_port=5
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... outer_src_ip=${GBPSFC6}
+ ... outer_dst_ip=${GBPSFC1}
+ ... proto=${PROTO}
Stop Endless Curl on h36_2 on port 80
[Documentation] Stopping endless HTTP session after traffic inspection finishes.
*** 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
+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 ***
*** Test Cases ***
Show GBPSFC1 Status
Read Tenants Confing From ODL
[Documentation] Logs ODL data store.
- Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ 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}
*** Settings ***
-Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Library OperatingSystem
-Library Collections
-Library json
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/RestconfUtils.robot
-Resource ../Variables.robot
+Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-asymmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Library Collections
+Library json
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/RestconfUtils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Delete Service Function Paths
[Documentation] Delete Service Function Paths from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFP_PATH}
Delete Service Function Chains
[Documentation] Delete Service Function Chains from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFC_PATH}
Delete Service Functions
[Documentation] Delete Service Function from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SF_PATH}
Delete Service Function Forwarders
[Documentation] Delete Service Function Forwarders from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFF_PATH}
Delete Tunnels
[Documentation] Delete Tunnels from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${TUNNELS_PATH}
Delete Tenant
[Documentation] Delete Tenant from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${TENANT_PATH}
Unregister Endpoints
[Documentation] Unregister Endpoints Endpoints from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
RestconfUtils.Unregister Endpoints
Delete OVSDB Topology If Present
[Documentation] Delete OVSDB topology from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
${resp} RequestsLibrary.Get Request session ${TOPOLOGY_PATH}
- Run Keyword If ${resp.status_code} == 200 Remove All Elements At URI And Verify ${TOPOLOGY_PATH}
+ IF ${resp.status_code} == 200
+ Remove All Elements At URI And Verify ${TOPOLOGY_PATH}
+ END
*** Settings ***
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBPSFC_6node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBPSFC_6node.robot
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Teardown Suite
*** Settings ***
-Resource ../Variables.robot
-Resource ../GBPSFC_6node.robot
+Resource ../Variables.robot
+Resource ../GBPSFC_6node.robot
+
*** Test Cases ***
Initialize Nodes
*** Settings ***
-Documentation Waiting for manager and switch connections.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Waiting for manager and switch connections.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Wait For Manager Connected on GBPSFC2
*** Settings ***
-Documentation Test suite for setting up infrastructure for demo-symmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Library OperatingSystem
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/SSHKeywords.robot
-Resource ../Variables.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Documentation Test suite for setting up infrastructure for demo-symmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/SSHKeywords.robot
+Resource ../Variables.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Put Service Functions
Register Endpoints
[Documentation] Endpoints registration
- @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_SYMM_DIR} vethl*.*json absolute
+ @{endpoint_files} OperatingSystem.List Files In Directory ${ENDPOINTS_SYMM_DIR} vethl*.*json absolute
FOR ${endpoint_file} IN @{endpoint_files}
Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
END
*** Settings ***
-Documentation Documentation Waiting for flows to appear on switches.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Resource ../../../../../libraries/GBP/DockerUtils.robot
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Documentation Waiting for flows to appear on switches.
+
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Resource ../../../../../libraries/GBP/DockerUtils.robot
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
+
*** Test Cases ***
Wait For Flows on GBPSFC1
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM in different subnets and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM in different subnets and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping Once from h35_2 to h36_2
[Documentation] Test icmp request.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h36_2
+ ... server_ip=10.0.36.2
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC1_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h35_2 to h36_2 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h36_2 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h35_2 to h36_2
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM in the same subnet and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM in the same subnet and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping Once from h35_2 to h35_3
[Documentation] Test icmp request.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h35_3 server_ip=10.0.35.3 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h35_3
+ ... server_ip=10.0.35.3
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC1_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h35_2 to h35_3 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=5 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=5
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h35_3 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=5 out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=5
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h35_2 to h35_3
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on the same VM, in different subnets and are members of the same EPG.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on the same VM, in different subnets and are members of the same EPG.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping from h36_4 to h35_4
[Documentation] Test icmp request.
- Set Test Variables client_name=h36_4 client_ip=10.0.36.4 server_name=h35_4 server_ip=10.0.35.4 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h36_4
+ ... client_ip=10.0.36.4
+ ... server_name=h35_4
+ ... server_ip=10.0.35.4
+ ... ether_type=0x0800
+ ... proto=1
Switch Connection GPSFC6_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h36_4 to h35_4 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=4 eth_type=0x0800 inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=4
+ ... eth_type=0x0800
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
... proto=${PROTO}
Find ICMP Resp from h35_4 to h36_4 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=6 eth_type=0x0800 inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=6
+ ... eth_type=0x0800
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
... proto=${PROTO}
Stop Endless Ping from h36_4 to h35_4
*** Settings ***
-Documentation Deep icmp traffic inspection.
-... Nodes are located on different VMs in different subnets and are members of different EPGs.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep icmp traffic inspection.
+... Nodes are located on different VMs in different subnets and are members of different EPGs.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Ping from h36_5 to h35_2
[Documentation] Test icmp request.
- Set Test Variables client_name=h36_5 client_ip=10.0.36.5 server_name=h35_2 server_ip=10.0.35.2 ether_type=0x0800 proto=1
+ Set Test Variables
+ ... client_name=h36_5
+ ... client_ip=10.0.36.5
+ ... server_name=h35_2
+ ... server_ip=10.0.35.2
+ ... ether_type=0x0800
+ ... proto=1
... vxlan_port=3
Switch Connection GPSFC6_CONNECTION
Ping from Docker ${CLIENT_NAME} ${SERVER_IP}
Find ICMP Req from h36_5 to h35_2 on GBPSFC6
[Documentation] Inspecting icmp req on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=7 out_port=${VXLAN_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC1} proto=${PROTO}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=7
+ ... out_port=${VXLAN_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... proto=${PROTO}
Find ICMP Req from h36_5 to h35_2 on GBPSFC1
[Documentation] Inspecting icmp req on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_PORT} out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC6}
- ... outer_dst_ip=${GBPSFC1} proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_PORT}
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC6}
+ ... outer_dst_ip=${GBPSFC1}
+ ... proto=${PROTO}
Find ICMP Resp from h35_2 to h36_5 on GBPSFC1
[Documentation] Inspecting icmp resp on GBPSFC1.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... next_hop_ip=${GBPSFC6} proto=${PROTO}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=${VXLAN_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC6}
+ ... proto=${PROTO}
Find ICMP Resp from h35_2 to h36_5 on GBPSFC6
[Documentation] Inspecting icmp resp on GBPSFC6.
Switch Connection GPSFC6_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_PORT} out_port=7 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC1}
- ... outer_dst_ip=${GBPSFC6} proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_PORT}
+ ... out_port=7
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC6}
+ ... proto=${PROTO}
Stop Endless Ping from h36_5 to h35_2
[Documentation] Stoping of endless pinging after traffic inspection finishes.
*** Settings ***
-Documentation Deep inspection of HTTP traffic on symmetric chain.
-... Nodes are located on the same VM.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep inspection of HTTP traffic on symmetric chain.
+... Nodes are located on the same VM.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Start HTTP on h36_2 on Port 80
[Documentation] Starting HTTP service on docker container.
- Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2 service_port=80 ether_type=0x0800
- ... proto=6 vxlan_gpe_port=2
+ Set Test Variables
+ ... client_name=h35_2
+ ... client_ip=10.0.35.2
+ ... server_name=h36_2
+ ... server_ip=10.0.36.2
+ ... service_port=80
+ ... ether_type=0x0800
+ ... proto=6
+ ... vxlan_gpe_port=2
Switch Connection GPSFC1_CONNECTION
Start HTTP Service on Docker ${SERVER_NAME} ${SERVICE_PORT}
On GBPSFC1 Send HTTP req h35_2-h36_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=4
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... dst_port=${SERVICE_PORT}
${nsp_35_2-nsp_36_2} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP_path1} ${nsp_35_2-nsp_36_2}
On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path1} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP_path1}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP req h35_2-h36_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path1} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path1}
+ ... received_nsi=255
On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path1}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path1} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP_path1}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP req h35_2-h36_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path1}
+ ... received_nsi=254
On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC1
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... nsp=${NSP_path1}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP req h35_2-h36_2 to h36_2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC4}
- ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC1}
+ ... nsp=${NSP_path1}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP resp h36_2-h35_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... next_hop_ip=${GBPSFC4} nsi=255 proto=${PROTO} src_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... src_port=${SERVICE_PORT}
${nsp_36_2-nsp_35_2} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP_path2} ${nsp_36_2-nsp_35_2}
On GBPSFC4 Send HTTP resp h36_2-h35_2 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path2} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP_path2}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP resp h36_2-h35_2 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path2} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path2}
+ ... received_nsi=255
On GBPSFC4 Send HTTP resp h36_2-h35_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path2}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC2 Send HTTP resp h36_2-h35_2 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path2} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP_path2}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP resp h36_2-h35_2 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path2}
+ ... received_nsi=254
On GBPSFC2 Send HTTP resp h36_2-h35_2 to GBPSFC1
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... nsp=${NSP_path2}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP resp h36_2-h35_2 to h35_2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC2}
- ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=4
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC1}
+ ... nsp=${NSP_path2}
+ ... nsi=253
+ ... proto=${PROTO}
Compare NSPs
[Documentation] Verifying that different paths were taken.
*** Settings ***
-Documentation Deep inspection of HTTP traffic on symmetric chain.
-... Nodes are located on different VMs.
-Suite Setup Start Connections
-Suite Teardown Close Connections
-Library SSHLibrary
-Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
-Resource ../Variables.robot
-Resource ../Connections.robot
+Documentation Deep inspection of HTTP traffic on symmetric chain.
+... Nodes are located on different VMs.
+
+Library SSHLibrary
+Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
+Resource ../Variables.robot
+Resource ../Connections.robot
+
+Suite Setup Start Connections
+Suite Teardown Close Connections
-*** Variables ***
*** Test Cases ***
Start HTTP on h36_4 on Port 80
[Documentation] Starting HTTP service on docker container.
- Set Test Variables client_name=h35_3 client_ip=10.0.35.3 server_name=h36_4 server_ip=10.0.36.4 service_port=80 ether_type=0x0800
- ... proto=6 vxlan_gpe_port=2
+ Set Test Variables
+ ... client_name=h35_3
+ ... client_ip=10.0.35.3
+ ... server_name=h36_4
+ ... server_ip=10.0.36.4
+ ... service_port=80
+ ... ether_type=0x0800
+ ... proto=6
+ ... vxlan_gpe_port=2
Switch Connection GPSFC6_CONNECTION
Start HTTP Service on Docker ${SERVER_NAME} ${SERVICE_PORT}
On GBPSFC1 Send HTTP req h35_3-h36_4 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=5 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
- ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=5
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... dst_port=${SERVICE_PORT}
${nsp_35_3-nsp_36_4} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP_path1} ${nsp_35_3-nsp_36_4}
On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path1} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC1}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP_path1}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP req h35_3-h36_4 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path1} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path1}
+ ... received_nsi=255
On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path1}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path1} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP_path1}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP req h35_3-h36_4 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path1}
+ ... received_nsi=254
On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC6
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
- ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC6} nsp=${NSP_path1} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... next_hop_ip=${GBPSFC6}
+ ... nsp=${NSP_path1}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC6 Send HTTP req h35_3-h36_4 to h36_4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC6_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC4}
- ... outer_dst_ip=${GBPSFC6} nsp=${NSP_path1} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=6
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${CLIENT_IP}
+ ... inner_dst_ip=${SERVER_IP}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC6}
+ ... nsp=${NSP_path1}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC6 Send HTTP resp h36_4-h35_3 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC6_CONNECTION
- ${flow} Inspect Classifier Outbound in_port=6 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
- ... next_hop_ip=${GBPSFC4} nsi=255 proto=${PROTO} src_port=${SERVICE_PORT}
+ ${flow} Inspect Classifier Outbound
+ ... in_port=6
+ ... out_port=${VXLAN_GPE_PORT}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsi=255
+ ... proto=${PROTO}
+ ... src_port=${SERVICE_PORT}
${nsp_36_4-nsp_35_3} GET NSP Value From Flow ${flow}
Set Global Variable ${NSP_path2} ${nsp_36_4-nsp_35_3}
On GBPSFC4 Send HTTP resp h36_4-h35_3 to GBPSFC5
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC6} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path2} nsi=255 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC6}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC5}
+ ... nsp=${NSP_path2}
+ ... nsi=255
+ ... proto=${PROTO}
On GBPSFC5 Send HTTP resp h36_4-h35_3 to GBPSFC4
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC5_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path2} received_nsi=255
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC5}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC4}
+ ... nsp=${NSP_path2}
+ ... received_nsi=255
On GBPSFC4 Send HTTP resp h36_4-h35_3 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC4_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC5}
+ ... outer_dst_ip=${GBPSFC4}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path2}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC2 Send HTTP resp h36_4-h35_3 to GBPSFC3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path2} nsi=254 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC4}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC3}
+ ... nsp=${NSP_path2}
+ ... nsi=254
+ ... proto=${PROTO}
On GBPSFC3 Send HTTP resp h36_4-h35_3 to GBPSFC2
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC3_CONNECTION
- Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} received_nsi=254
+ Inspect Service Function
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC3}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC2}
+ ... nsp=${NSP_path2}
+ ... received_nsi=254
On GBPSFC2 Send HTTP resp h36_4-h35_3 to GBPSFC1
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC2_CONNECTION
- Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
- ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
+ Inspect Service Function Forwarder
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=${VXLAN_GPE_PORT}
+ ... outer_src_ip=${GBPSFC3}
+ ... outer_dst_ip=${GBPSFC2}
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... next_hop_ip=${GBPSFC1}
+ ... nsp=${NSP_path2}
+ ... nsi=253
+ ... proto=${PROTO}
On GBPSFC1 Send HTTP resp h36_4-h35_3 to h35_3
[Documentation] HTTP traffic inspection.
Switch Connection GPSFC1_CONNECTION
- Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=5 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC2}
- ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
+ Inspect Classifier Inbound
+ ... in_port=${VXLAN_GPE_PORT}
+ ... out_port=5
+ ... eth_type=${ETHER_TYPE}
+ ... inner_src_ip=${SERVER_IP}
+ ... inner_dst_ip=${CLIENT_IP}
+ ... outer_src_ip=${GBPSFC2}
+ ... outer_dst_ip=${GBPSFC1}
+ ... nsp=${NSP_path2}
+ ... nsi=253
+ ... proto=${PROTO}
Compare NSPs
[Documentation] Verifying that different paths were taken.
*** 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
+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 ***
*** Test Cases ***
Show GBPSFC1 Status
Read Tenants Confing From ODL
[Documentation] Logs ODL data store.
- Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
+ 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}
*** Settings ***
-Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-symmetric-chain
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Library OperatingSystem
-Library Collections
-Library json
-Variables ../../../../../variables/Variables.py
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/RestconfUtils.robot
-Resource ../Variables.robot
+Documentation Test suite for cleaning up / unregister infrastructure constructs like endpoints for demo-symmetric-chain
+
+Library RequestsLibrary
+Library OperatingSystem
+Library Collections
+Library json
+Variables ../../../../../variables/Variables.py
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/RestconfUtils.robot
+Resource ../Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Delete Service Function Paths
[Documentation] Delete Service Function Paths from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFP_PATH}
Delete Service Function Chains
[Documentation] Delete Service Function Chains from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFC_PATH}
Delete Service Functions
[Documentation] Delete Service Function from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SF_PATH}
Delete Service Function Forwarders
[Documentation] Delete Service Function Forwarders from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${SFF_PATH}
Delete Tunnels
[Documentation] Delete Tenant from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${TUNNELS_PATH}
Delete Tenant
[Documentation] Delete Tenant from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
Remove All Elements At URI And Verify ${TENANT_PATH}
Unregister Endpoints
[Documentation] Unregister Endpoints Endpoints from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
RestconfUtils.Unregister Endpoints
Delete OVSDB Topology If Present
[Documentation] Delete OVSDB topology from ODL
- [Tags] GBPSFCTEAR
+ [Tags] gbpsfctear
${resp} RequestsLibrary.Get Request session ${TOPOLOGY_PATH}
- Run Keyword If ${resp.status_code} == 200 Remove All Elements At URI And Verify ${TOPOLOGY_PATH}
+ IF ${resp.status_code} == 200
+ Remove All Elements At URI And Verify ${TOPOLOGY_PATH}
+ END
*** Settings ***
-Library SSHLibrary
-Resource ../../../../../libraries/Utils.robot
-Resource ../../../../../libraries/GBP/ConnUtils.robot
-Variables ../../../../../variables/Variables.py
-Resource ../Variables.robot
-Resource ../GBPSFC_6node.robot
+Library SSHLibrary
+Resource ../../../../../libraries/Utils.robot
+Resource ../../../../../libraries/GBP/ConnUtils.robot
+Variables ../../../../../variables/Variables.py
+Resource ../Variables.robot
+Resource ../GBPSFC_6node.robot
+
*** Variables ***
-${timeout} 10s
+${timeout} 10s
+
*** Test Cases ***
Teardown Suite
*** Settings ***
-Documentation Test suite for Group Based Policy, sxp-ep-provider component.
-Suite Setup Suite_Startup
-Suite Teardown Suite_Cleanup
-Test Setup GbpSxp.Prepare_Ssh_Tooling
-Test Teardown Wipe_Clean_Ep_Templates_And_Sxp_Node
-Library OperatingSystem WITH NAME os
-Library RequestsLibrary
-Library SSHLibrary
-Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
-Resource ../../../variables/Variables.robot
-Resource ../../../libraries/Utils.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ../../../libraries/GbpSxp.robot
+Documentation Test suite for Group Based Policy, sxp-ep-provider component.
+
+Library OperatingSystem WITH NAME os
+Library RequestsLibrary
+Library SSHLibrary
+Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
+Resource ../../../variables/Variables.robot
+Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource ../../../libraries/GbpSxp.robot
+
+Suite Setup Suite_Startup
+Suite Teardown Suite_Cleanup
+Test Setup GbpSxp.Prepare_Ssh_Tooling
+Test Teardown Wipe_Clean_Ep_Templates_And_Sxp_Node
+
*** Variables ***
-${EP_PROVIDER_TEMPLATES_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ep-provider-templates
-${SXP_NODE_CONFIG_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-node.json
-${SXP_NODE_ADD_ENTRY_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-node-add-entry.json
-${GBP_RPC_UNREGISTER_ENDPOINT_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-rpc-unregister-endpoint.json
-${GBP_EXPECTED_ENDPOINTS_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-endpoint
-${ISE_MOCK_SERVER_API_FOLDER} mock-server-tc010
-${CONFIGURE_ISE_SOURCE_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ise-source.json
-${SXP_NODE_NAME} 1.1.1.1
+${EP_PROVIDER_TEMPLATES_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ep-provider-templates
+${SXP_NODE_CONFIG_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-node.json
+${SXP_NODE_ADD_ENTRY_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-node-add-entry.json
+${GBP_RPC_UNREGISTER_ENDPOINT_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-rpc-unregister-endpoint.json
+${GBP_EXPECTED_ENDPOINTS_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-endpoint
+${ISE_MOCK_SERVER_API_FOLDER} mock-server-tc010
+${CONFIGURE_ISE_SOURCE_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ise-source.json
+${SXP_NODE_NAME} 1.1.1.1
+
*** Test Cases ***
Register_EP_Using_Manual_Inputs
[Documentation] Elicit endpoint registration by providing ep-forwarding-template and ip-sgt binding (ep-policy-template will loaded from ise-API)
Utils.Add_Elements_To_URI_From_File ${SXP_EP_PROVIDER_CONFIG_URI} ${EP_PROVIDER_TEMPLATES_FILE}-2.2.json
gbpsxp.Deploy_Ise_Mock_Server ${ISE_MOCK_SERVER_API_FOLDER} ${ISE_REST_PORT}
- ${ise_harvest_status_json} gbpsxp.Configure_Ise_Source_And_Gain_Harvest_Status session ${CONFIGURE_ISE_SOURCE_FILE} http://${TOOLS_SYSTEM_IP}:${ISE_REST_PORT}
+ ${ise_harvest_status_json} gbpsxp.Configure_Ise_Source_And_Gain_Harvest_Status
+ ... session
+ ... ${CONFIGURE_ISE_SOURCE_FILE}
+ ... http://${TOOLS_SYSTEM_IP}:${ISE_REST_PORT}
gbpsxp.Check_Ise_Harvest_Status ${ise_harvest_status_json} 5
Create_sxp_node session ${SXP_NODE_CONFIG_FILE} ${SXP_NODE_NAME}
Utils.Post_Elements_To_URI_From_File ${SXP_NODE_RPC_ADD_ENTRY_URI} ${SXP_NODE_ADD_ENTRY_FILE}
gbpsxp.Clean_ise_source_config
gbpsxp.Teardown_Ise_Mock_Server ${ISE_MOCK_SERVER_API_FOLDER}
+
*** Keywords ***
Suite_Startup
[Documentation] Setup session and set karaf log levels
- RequestsLibrary.Create_Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+ RequestsLibrary.Create_Session
+ ... session
+ ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+ ... auth=${AUTH}
+ ... headers=${HEADERS}
KarafKeywords.Setup_Karaf_Keywords
${karaf_debug_enabled} BuiltIn.Get_Variable_Value ${KARAF_DEBUG} ${False}
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.sxp
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.groupbasedpolicy.renderer
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.groupbasedpolicy.sxp
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.groupbasedpolicy.sxp_ep_provider
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.sxp
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set DEBUG org.opendaylight.groupbasedpolicy.renderer
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set DEBUG org.opendaylight.groupbasedpolicy.sxp
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set DEBUG org.opendaylight.groupbasedpolicy.sxp_ep_provider
+ END
Suite_Cleanup
[Documentation] Cleanup session and set karaf log levels to default
${karaf_debug_enabled} BuiltIn.Get_Variable_Value ${KARAF_DEBUG} ${False}
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set INFO org.opendaylight.sxp
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set INFO org.opendaylight.groupbasedpolicy.renderer
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set INFO org.opendaylight.groupbasedpolicy.sxp
- BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set INFO org.opendaylight.groupbasedpolicy.sxp_ep_provider
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set INFO org.opendaylight.sxp
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set INFO org.opendaylight.groupbasedpolicy.renderer
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set INFO org.opendaylight.groupbasedpolicy.sxp
+ END
+ IF ${karaf_debug_enabled}
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background
+ ... log:set INFO org.opendaylight.groupbasedpolicy.sxp_ep_provider
+ END
RequestsLibrary.Delete_All_Sessions
Wipe_Clean_Ep_Templates_And_Sxp_Node
[Documentation] Delete sxp-ep-provider templates and sxp node
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${SXP_EP_PROVIDER_CONFIG_URI}
- BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${SXP_NODE_NAME}
+ BuiltIn.Run_Keyword_And_Ignore_Error
+ ... Utils.Remove_All_Elements_If_Exist
+ ... ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${SXP_NODE_NAME}
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${GBP_TENANT_CONFIG_URI}
Utils.Post_Elements_To_URI_From_File ${GBP_RPC_UNREGISTER_ENDPOINT_URI} ${GBP_RPC_UNREGISTER_ENDPOINT_FILE}
BuiltIn.Wait_Until_Keyword_Succeeds 5 1 Check_For_Clean_Endpoints session
gbpsxp.Teardown_Ssh_Tooling
Check_For_Clean_Endpoints
- [Arguments] ${session_arg}
[Documentation] Ensure that there are no endpoints in the system
+ [Arguments] ${session_arg}
${actual_endpoints} Utils.Get_Data_From_URI ${session_arg} ${GBP_ENDPOINTS_URI}
${actual_endpoints_json} Utils.Json_Parse_From_String ${actual_endpoints}
BuiltIn.Should_Be_Empty ${actual_endpoints_json['endpoints']['address-endpoints']}
Wait_For_Endpoint_And_Check
- [Arguments] ${session_arg} ${expected_endpoints}
[Documentation] Wait for endpoint to appear in DS/operational and compare to expected endpoint
- ${actual_endpoints_no_timestamp} BuiltIn.Wait_Until_Keyword_Succeeds 5 1 Get_Endpoints_And_Clean_Timestamp ${session_arg}
+ [Arguments] ${session_arg} ${expected_endpoints}
+ ${actual_endpoints_no_timestamp} BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 5
+ ... 1
+ ... Get_Endpoints_And_Clean_Timestamp
+ ... ${session_arg}
TemplatedRequests.Normalize_Jsons_And_Compare ${expected_endpoints} ${actual_endpoints_no_timestamp}
Get_Endpoints_And_Clean_Timestamp
- [Arguments] ${session_arg}
[Documentation] Read endpoints from DS/operational and clean timestamp for simple comparison
+ [Arguments] ${session_arg}
${actual_endpoints} Utils.Get_Data_From_URI ${session_arg} ${GBP_ENDPOINTS_URI}
${actual_endpoints_json} Utils.Json_Parse_From_String ${actual_endpoints}
${actual_endpoints_no_timestamp} gbpsxp.Remove_Endpoint_Timestamp ${actual_endpoints_json}
- [Return] ${actual_endpoints_no_timestamp}
+ RETURN ${actual_endpoints_no_timestamp}
Create_sxp_node
- [Arguments] ${session_arg} ${sxp_node_config_file} ${sxp_node_id}
[Documentation] Create sxp node and wait till it appears in DS/operational
- ${previous_topology_config} BuiltIn.Run_Keyword_And_Ignore_Error Utils.Get_Data_From_URI ${session_arg} ${SXP_TOPOLOGY_NODE_CONFIG_URI}
+ [Arguments] ${session_arg} ${sxp_node_config_file} ${sxp_node_id}
+ ${previous_topology_config} BuiltIn.Run_Keyword_And_Ignore_Error
+ ... Utils.Get_Data_From_URI
+ ... ${session_arg}
+ ... ${SXP_TOPOLOGY_NODE_CONFIG_URI}
BuiltIn.Log ${previous_topology_config}
- Utils.Add_Elements_To_URI_From_File_And_Verify ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${sxp_node_id} ${sxp_node_config_file}
- ${sxp_node_config_readback} Utils.Get_Data_From_URI ${session_arg} ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${sxp_node_id}
- BuiltIn.Wait_Until_Keyword_Succeeds 20 2 Check_If_Sxp_Node_Is_Enabled ${session_arg} ${SXP_TOPOLOGY_NODE_OPERATIONAL_URI}/node/${sxp_node_id}
+ Utils.Add_Elements_To_URI_From_File_And_Verify
+ ... ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${sxp_node_id}
+ ... ${sxp_node_config_file}
+ ${sxp_node_config_readback} Utils.Get_Data_From_URI
+ ... ${session_arg}
+ ... ${SXP_TOPOLOGY_NODE_CONFIG_URI}/node/${sxp_node_id}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 20
+ ... 2
+ ... Check_If_Sxp_Node_Is_Enabled
+ ... ${session_arg}
+ ... ${SXP_TOPOLOGY_NODE_OPERATIONAL_URI}/node/${sxp_node_id}
Check_If_Sxp_Node_Is_Enabled
- [Arguments] ${session_arg} ${node_uri}
[Documentation] Read node enabled leaf and check if it is true
+ [Arguments] ${session_arg} ${node_uri}
${sxp_node} Utils.Get_Data_From_URI ${session_arg} ${node_uri}
${sxp_node_json} Utils.Json_Parse_From_String ${sxp_node}
${sxp_node_enabled} gbpsxp.Resolve_sxp_node_is_enabled ${sxp_node_json}
*** Settings ***
-Documentation Test suite for Group Based Policy, sxp-ep-provider component.
-Suite Setup Setup_Http_And_Netconf
-Suite Teardown Teardown_Http_And_Netconf
-Test Setup Prepare_Renderer_Prerequisities
-Test Teardown Wipe_Clean_Renderer_Policy_Cohort
-Library OperatingSystem WITH NAME os
-Library RequestsLibrary WITH NAME reqLib
-Library SSHLibrary
-Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
-Resource ../../../variables/Variables.robot
-Resource ../../../variables/sfc/Variables.robot
-Resource ../../../libraries/Utils.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/NetconfKeywords.robot
-Resource ../../../libraries/GbpSxp.robot
+Documentation Test suite for Group Based Policy, sxp-ep-provider component.
+
+Library OperatingSystem WITH NAME os
+Library RequestsLibrary WITH NAME reqLib
+Library SSHLibrary
+Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
+Resource ../../../variables/Variables.robot
+Resource ../../../variables/sfc/Variables.robot
+Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/NetconfKeywords.robot
+Resource ../../../libraries/GbpSxp.robot
+
+Suite Setup Setup_Http_And_Netconf
+Suite Teardown Teardown_Http_And_Netconf
+Test Setup Prepare_Renderer_Prerequisities
+Test Teardown Wipe_Clean_Renderer_Policy_Cohort
+
*** Variables ***
-${EP_PROVIDER_TEMPLATES_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ep-policy-templates
-${IOS_XE_SCHEMAS_FOLDER} ${CURDIR}/../../../variables/gbp/ios-xe-schemas
-${GBP_RENDERER_POLICY_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-renderer-policy.json
+${EP_PROVIDER_TEMPLATES_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ep-policy-templates
+${IOS_XE_SCHEMAS_FOLDER} ${CURDIR}/../../../variables/gbp/ios-xe-schemas
+${GBP_RENDERER_POLICY_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-renderer-policy.json
# netconf
-@{IOS_XE_IP} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
-@{IOS_XE_NODE_NAMES} ios-xe-mock-1 ios-xe-mock-2
-${NETCONF_CONFIG_IOSXE_NODE_FILE} ${CURDIR}/../../../variables/gbp/ios-xe-netconf-node.json
+@{IOS_XE_IP} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
+@{IOS_XE_NODE_NAMES} ios-xe-mock-1 ios-xe-mock-2
+${NETCONF_CONFIG_IOSXE_NODE_FILE} ${CURDIR}/../../../variables/gbp/ios-xe-netconf-node.json
# sfc configuration
-${SFC_SERVICE_FUNCTIONS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-functions.json
-${SFC_SF_FORWARDERS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-forwarders.json
-${SFC_SF_CHAINS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-chains.json
-${SFC_SF_PATHS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-paths.json
+${SFC_SERVICE_FUNCTIONS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-functions.json
+${SFC_SF_FORWARDERS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-forwarders.json
+${SFC_SF_CHAINS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-chains.json
+${SFC_SF_PATHS_FILE} ${CURDIR}/../../../variables/gbp/sfc/service-function-paths.json
+
*** Test Cases ***
Configure_Sfc_And_Ios_Xe_Renderer_Using_Generated_Sgt
[Documentation] Elicit netconf device configuration by providing sfc configurations and ios-xe renderer policy
${renderer_policy} ${next_version} Provision_renderer_policy session ${GBP_RENDERER_POLICY_FILE}
Utils.Add_Elements_To_URI_And_Verify ${GBP_RENDERER_CONFIG_URI}/renderer-policy ${renderer_policy}
- BuiltIn.Wait_Until_Keyword_Succeeds 30 2 Check_Renderer_Policy_Status_Version session ${next_version}
- ${security_group_json} BuiltIn.Wait_Until_Keyword_Succeeds 20 2 Seek_Security_Group session ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[1]}/${MOUNTPOINT_IOSXE_SUFFIX}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30
+ ... 2
+ ... Check_Renderer_Policy_Status_Version
+ ... session
+ ... ${next_version}
+ ${security_group_json} BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 20
+ ... 2
+ ... Seek_Security_Group
+ ... session
+ ... ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[1]}/${MOUNTPOINT_IOSXE_SUFFIX}
BuiltIn.Log ${security_group_json['source']['tag']} level=DEBUG
BuiltIn.Log ${security_group_json['destination']['tag']} level=DEBUG
BuiltIn.Should_Be_Equal_As_Integers 100 ${security_group_json['source']['tag']}
Utils.Add_Elements_To_URI_From_File ${SXP_EP_PROVIDER_CONFIG_URI} ${EP_PROVIDER_TEMPLATES_FILE}-3.2.json
${renderer_policy} ${next_version} Provision_renderer_policy session ${GBP_RENDERER_POLICY_FILE}
Utils.Add_Elements_To_URI_And_Verify ${GBP_RENDERER_CONFIG_URI}/renderer-policy ${renderer_policy}
- BuiltIn.Wait_Until_Keyword_Succeeds 30 2 Check_Renderer_Policy_Status_Version session ${next_version}
- ${security_group_json} BuiltIn.Wait_Until_Keyword_Succeeds 20 2 Seek_Security_Group session ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[1]}/${MOUNTPOINT_IOSXE_SUFFIX}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30
+ ... 2
+ ... Check_Renderer_Policy_Status_Version
+ ... session
+ ... ${next_version}
+ ${security_group_json} BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 20
+ ... 2
+ ... Seek_Security_Group
+ ... session
+ ... ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[1]}/${MOUNTPOINT_IOSXE_SUFFIX}
BuiltIn.Log ${security_group_json['source']['tag']} level=DEBUG
BuiltIn.Log ${security_group_json['destination']['tag']} level=DEBUG
BuiltIn.Should_Be_Equal_As_Integers 43 ${security_group_json['source']['tag']}
BuiltIn.Should_Be_Equal_As_Integers 42 ${security_group_json['destination']['tag']}
+
*** Keywords ***
Setup_Http_And_Netconf
[Documentation] Setup http session, setup ssh session to tools, deploy netconf-testtool (with ios-xe schemas) and start
NetconfKeywords.Setup_NetconfKeywords
${run_netconf_testtool_manually} BuiltIn.Get_Variable_Value ${run_netconf_testtool_manually} ${False}
${logfile} Utils.Get_Log_File_Name testtool
- BuiltIn.Run_Keyword_If ${run_netconf_testtool_manually} BuiltIn.Set_Suite_Variable ${testtool_log} ${logfile}
+ IF ${run_netconf_testtool_manually}
+ BuiltIn.Set_Suite_Variable ${testtool_log} ${logfile}
+ END
FOR ${ssh_session} IN @{TOOLS_SESSIONS}
SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
- BuiltIn.Run_Keyword_If not ${run_netconf_testtool_manually} Install_And_Start_Testtool device-count=1 debug=false schemas=${IOS_XE_SCHEMAS_FOLDER}
- ... mdsal=true
+ IF not ${run_netconf_testtool_manually}
+ Install_And_Start_Testtool
+ ... device-count=1
+ ... debug=false
+ ... schemas=${IOS_XE_SCHEMAS_FOLDER}
+ ... mdsal=true
+ END
END
Teardown_Http_And_Netconf
FOR ${INDEX} IN RANGE 0 2
BuiltIn.Log ${INDEX}
${netconf_node_configuration_json} Utils.Json_Parse_From_File ${NETCONF_CONFIG_IOSXE_NODE_FILE}
- ${netconf_node_configuration} gbpsxp.Replace_Netconf_Node_Host ${netconf_node_configuration_json} ${IOS_XE_NODE_NAMES[${INDEX}]} ${IOS_XE_IP[${INDEX}]}
+ ${netconf_node_configuration} gbpsxp.Replace_Netconf_Node_Host
+ ... ${netconf_node_configuration_json}
+ ... ${IOS_XE_NODE_NAMES[${INDEX}]}
+ ... ${IOS_XE_IP[${INDEX}]}
BuiltIn.Log ${netconf_node_configuration} level=DEBUG
- Utils.Add_Elements_To_URI_And_Verify ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]} ${netconf_node_configuration}
+ Utils.Add_Elements_To_URI_And_Verify
+ ... ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}
+ ... ${netconf_node_configuration}
END
FOR ${INDEX} IN RANGE 0 2
BuiltIn.Log ${INDEX}
- BuiltIn.Wait_Until_Keyword_Succeeds 30 2 Check_Netconf_Node_Status session ${NETCONF_OPERATIONAL_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}
- BuiltIn.Wait_Until_Keyword_Succeeds 10x 3s TemplatedRequests.Get_From_Uri ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}/yang-ext:mount session=session
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30
+ ... 2
+ ... Check_Netconf_Node_Status
+ ... session
+ ... ${NETCONF_OPERATIONAL_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10x
+ ... 3s
+ ... TemplatedRequests.Get_From_Uri
+ ... ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}/yang-ext:mount
+ ... session=session
END
Utils.Add_Elements_To_URI_From_File ${SERVICE_FUNCTIONS_URI} ${SFC_SERVICE_FUNCTIONS_FILE}
&{ip_mgmt_map} BuiltIn.Create_Dictionary SFF1=${TOOLS_SYSTEM_2_IP} SFF2=${TOOLS_SYSTEM_IP}
Utils.Add_Elements_To_URI_From_File ${SERVICE_FUNCTION_PATHS_URI} ${SFC_SF_PATHS_FILE}
Check_Netconf_Node_Status
- [Arguments] ${session_arg} ${node_operational_uri}
[Documentation] Check if connection status of given node is 'connected'
+ [Arguments] ${session_arg} ${node_operational_uri}
${node_content} Utils.Get_Data_From_URI ${session_arg} ${node_operational_uri}
${node_content_json} Utils.Json_Parse_From_String ${node_content}
- BuiltIn.Should_Be_Equal_As_Strings connected ${node_content_json['node'][0]['netconf-node-topology:connection-status']}
+ BuiltIn.Should_Be_Equal_As_Strings
+ ... connected
+ ... ${node_content_json['node'][0]['netconf-node-topology:connection-status']}
Wipe_Clean_Renderer_Policy_Cohort
[Documentation] Delete ep-policy-templates, renderer-policy, sfc configuraions, netconf-device config
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${GBP_RENDERER_CONFIG_URI}
# clean netconf-device config (behind mountpoint) and disconnect by removing it from DS/config
FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
- BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}/${MOUNTPOINT_IOSXE_SUFFIX}
- BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}
+ BuiltIn.Run_Keyword_And_Ignore_Error
+ ... Utils.Remove_All_Elements_If_Exist
+ ... ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}/${MOUNTPOINT_IOSXE_SUFFIX}
+ BuiltIn.Run_Keyword_And_Ignore_Error
+ ... Utils.Remove_All_Elements_If_Exist
+ ... ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}
END
FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
- BuiltIn.Wait_Until_Keyword_Succeeds 5 1 Utils.No_Content_From_URI session ${NETCONF_OPERATIONAL_URI}/node/${ios_xe_node_name}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 5
+ ... 1
+ ... Utils.No_Content_From_URI
+ ... session
+ ... ${NETCONF_OPERATIONAL_URI}/node/${ios_xe_node_name}
END
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${SXP_EP_PROVIDER_CONFIG_URI}
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${GBP_TENANT_CONFIG_URI}
Seek_Security_Group
- [Arguments] ${session_arg} ${config_uri}
[Documentation] Read given DS and seek CONFIG['native']['class-map'][0]['match']['security-group']
+ [Arguments] ${session_arg} ${config_uri}
${device_ds_config} Utils.Get_Data_From_URI ${session_arg} ${config_uri}
${device_ds_config_json} Utils.Json_Parse_From_String ${device_ds_config}
- [Return] ${device_ds_config_json['native']['class-map'][0]['match']['security-group']}
+ RETURN ${device_ds_config_json['native']['class-map'][0]['match']['security-group']}
Propose_Renderer_Configuration_Next_Version
- [Arguments] ${session_arg}
[Documentation] Read current renderer configuration status and compute next version or use 0 if status absents
- ${renderer_policy} BuiltIn.Run_Keyword_And_Ignore_Error Utils.Get_Data_From_URI ${session_arg} ${GBP_RENDERER_POLICY_OPERATIONAL_URI}
- BuiltIn.Return_From_Keyword_If '${renderer_policy[0]}' != 'PASS' 0
+ [Arguments] ${session_arg}
+ ${renderer_policy} BuiltIn.Run_Keyword_And_Ignore_Error
+ ... Utils.Get_Data_From_URI
+ ... ${session_arg}
+ ... ${GBP_RENDERER_POLICY_OPERATIONAL_URI}
+ IF '${renderer_policy[0]}' != 'PASS' RETURN 0
${renderer_policy_json} Utils.Json_Parse_From_String ${renderer_policy[1]}
${current_version} BuiltIn.Convert_To_Integer ${renderer_policy_json['renderer-policy']['version']}
- [Return] ${current_version + 1}
+ RETURN ${current_version + 1}
Provision_renderer_policy
- [Arguments] ${session_arg} ${renderer_policy_file}
[Documentation] Replace version number in given renderer-policy in order to be the next expected value
+ [Arguments] ${session_arg} ${renderer_policy_file}
${renderer_policy_json} Utils.Json_Parse_From_File ${renderer_policy_file}
${next_version} Propose_Renderer_Configuration_Next_Version ${session_arg}
${renderer_policy_updated} gbpsxp.Replace_Renderer_Policy_Version ${renderer_policy_json} ${next_version}
- [Return] ${renderer_policy_updated} ${next_version}
+ RETURN ${renderer_policy_updated} ${next_version}
Check_Renderer_Policy_Status_Version
- [Arguments] ${session_arg} ${expected_version}
[Documentation] Read current renderer policy version and compare it to expected version
+ [Arguments] ${session_arg} ${expected_version}
${renderer_policy} Utils.Get_Data_From_URI ${session_arg} ${GBP_RENDERER_POLICY_OPERATIONAL_URI}
${renderer_policy_json} Utils.Json_Parse_From_String ${renderer_policy}
BuiltIn.Should_Be_Equal_As_Integers ${renderer_policy_json['renderer-policy']['version']} ${expected_version}
*** Settings ***
-Documentation Test suite for Group Based Policy, sxp-ise-adapter component.
-Suite Setup Setup_Ise_Cohort
-Suite Teardown Wipe_Clean_Ise_Source_Cohort
-Library OperatingSystem WITH NAME os
-Library SSHLibrary
-Library RequestsLibrary
-Library DateTime
-Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
-Resource ../../../variables/Variables.robot
-Resource ../../../libraries/Utils.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/GbpSxp.robot
+Documentation Test suite for Group Based Policy, sxp-ise-adapter component.
+
+Library OperatingSystem WITH NAME os
+Library SSHLibrary
+Library RequestsLibrary
+Library DateTime
+Library ../../../libraries/GbpSxp.py WITH NAME gbpsxp
+Resource ../../../variables/Variables.robot
+Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/GbpSxp.robot
+
+Suite Setup Setup_Ise_Cohort
+Suite Teardown Wipe_Clean_Ise_Source_Cohort
+
*** Variables ***
-${CONFIGURE_ISE_SOURCE_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ise-source.json
+${CONFIGURE_ISE_SOURCE_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ise-source.json
${EXPECTED_EP_POLICY_TEMPLATES_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-ep-policy-templates.json
-${EXPECTED_TENANT_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-tenant.json
-${ISE_API_DIR} ${CURDIR}/../../../variables/gbp/ise-mock-server-api
-${ISE_MOCK_SERVER_API_FOLDER} mock-server-tc010
+${EXPECTED_TENANT_FILE} ${CURDIR}/../../../variables/gbp/gbpsxp-tenant.json
+${ISE_API_DIR} ${CURDIR}/../../../variables/gbp/ise-mock-server-api
+${ISE_MOCK_SERVER_API_FOLDER} mock-server-tc010
+
*** Test Cases ***
Configure_Ise_Source_And_Check_Results
[Documentation] Configure ise source using JSON file,
... read status of ise-source harvest action (DS/operational/ise-source),
... read+check ep-templates and endpoint-groups
- ${ise_harvest_status_json} gbpsxp.Configure_Ise_Source_And_Gain_Harvest_Status session ${CONFIGURE_ISE_SOURCE_FILE} http://${TOOLS_SYSTEM_IP}:${ISE_REST_PORT}
+ ${ise_harvest_status_json} gbpsxp.Configure_Ise_Source_And_Gain_Harvest_Status
+ ... session
+ ... ${CONFIGURE_ISE_SOURCE_FILE}
+ ... http://${TOOLS_SYSTEM_IP}:${ISE_REST_PORT}
gbpsxp.Check_Ise_Harvest_Status ${ise_harvest_status_json} 5
${expected_templates} os.Get_File ${EXPECTED_EP_POLICY_TEMPLATES_FILE}
${actual_templates} Utils.Get_Data_From_URI session ${GBP_EP_TEMPLATES_CONFIG_URI}
${actual_tenant} Utils.Get_Data_From_URI session ${GBP_TENANT_CONFIG_URI}
TemplatedRequests.Normalize_Jsons_And_Compare ${expected_tenant} ${actual_tenant}
+
*** Keywords ***
Setup_Ise_Cohort
[Documentation] Start ise mock and prepare restconf session
- RequestsLibrary.Create_Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+ RequestsLibrary.Create_Session
+ ... session
+ ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+ ... auth=${AUTH}
+ ... headers=${HEADERS}
GbpSxp.Prepare_Ssh_Tooling
gbpsxp.Deploy_Ise_Mock_Server ${ISE_MOCK_SERVER_API_FOLDER} ${ISE_REST_PORT}
*** Settings ***
-Documentation Test suite for Group Based Policy, Operates functions from Restconf APIs.
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library RequestsLibrary
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/Utils.robot
+Documentation Test suite for Group Based Policy, Operates functions from Restconf APIs.
+
+Library SSHLibrary
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/Utils.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Variables ***
-${REGISTER_ENDPOINT_FILE} ../../../variables/gbp/register-endpoint.json
-${UNREGISTER_ENDPOINT_FILE} ../../../variables/gbp/unregister-endpoint.json
+${REGISTER_ENDPOINT_FILE} ../../../variables/gbp/register-endpoint.json
+${UNREGISTER_ENDPOINT_FILE} ../../../variables/gbp/unregister-endpoint.json
+
*** Test Cases ***
Register and Unregister Endpoint
*** Settings ***
-Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library RequestsLibrary
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/CompareStream.robot
-Resource ../../../libraries/Utils.robot
+Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
+
+Library SSHLibrary
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/CompareStream.robot
+Resource ../../../libraries/Utils.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Init Variables
[Documentation] Clean All Tenants In Datastore After Tests
Remove All Elements At URI ${GBP_TENANTS_API}
+
*** Keywords ***
Init Variables Master
[Documentation] Sets variables specific to latest(master) version
*** Settings ***
-Documentation Test suite for GBP Tunnels, Operates functions from Restconf APIs.
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library RequestsLibrary
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/Utils.robot
+Documentation Test suite for GBP Tunnels, Operates functions from Restconf APIs.
+
+Library SSHLibrary
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/Utils.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+
*** Variables ***
-${GBP_TUNNELS_FILE} ../../../variables/gbp/tunnels.json
-${GBP_TUNNEL_ID} openflow:1
-${GBP_TUNNEL1_URL} /restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/${GBP_TUNNEL_ID}
-${GBP_TUNNEL1_FILE} ../../../variables/gbp/tunnel1.json
+${GBP_TUNNELS_FILE} ../../../variables/gbp/tunnels.json
+${GBP_TUNNEL_ID} openflow:1
+${GBP_TUNNEL1_URL} /restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/${GBP_TUNNEL_ID}
+${GBP_TUNNEL1_FILE} ../../../variables/gbp/tunnel1.json
+
*** Test Cases ***
Add Tunnels