From eb6f6620ee35cce6f31c0e0288934ef04f03dd78 Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Fri, 9 Sep 2022 19:18:43 -0700 Subject: [PATCH] Update Robot Framework format - step 7 Robotidy has stricter formatting rules for line width, alignment, section ordering & spacing, etc. Update the format of Robot Framework files in the following directory with Robotidy: - csit/suites/groupbasedpolicy JIRA: INTTEST-132 Change-Id: I3d2e96af277966bad31af48fb15ea591c84251ff Signed-off-by: Sangwook Ha --- .../020_simple_clustering.robot | 24 +- .../GBP/3-node/Connections.robot | 12 +- .../GBP/3-node/GBP_3node.robot | 25 +- .../GBP/3-node/Variables.robot | 37 +-- .../GBP/3-node/__init__.robot | 47 +++- .../GBP/3-node/gbp1/000_setup.robot | 19 +- .../GBP/3-node/gbp1/001_set_odl.robot | 24 +- .../GBP/3-node/gbp1/002_wait_flows.robot | 26 +- .../GBP/3-node/gbp1/010_icmp.robot | 29 ++- .../GBP/3-node/gbp1/020_http.robot | 29 ++- .../GBP/3-node/gbp1/040_show_data.robot | 22 +- .../GBP/3-node/gbp1/998_clean_odl.robot | 26 +- .../GBP/3-node/gbp1/999_teardown.robot | 19 +- .../3-node/gbp2-multitenant/000_setup.robot | 19 +- .../3-node/gbp2-multitenant/001_set_odl.robot | 24 +- .../gbp2-multitenant/002_wait_flows.robot | 26 +- .../3-node/gbp2-multitenant/010_icmp.robot | 52 +++- .../3-node/gbp2-multitenant/020_http.robot | 52 +++- .../gbp2-multitenant/040_show_data.robot | 22 +- .../gbp2-multitenant/998_clean_odl.robot | 26 +- .../gbp2-multitenant/999_teardown.robot | 19 +- .../GBP/Devstack/01__wait_for_odl.robot | 24 +- .../Devstack/02__neutron-mapper_test.robot | 87 ++++--- .../GBP/Devstack/Variables.robot | 26 +- .../GBPSFC/6-node/Connections.robot | 11 +- .../GBPSFC/6-node/GBPSFC_6node.robot | 48 ++-- .../GBPSFC/6-node/Variables.robot | 93 ++++--- .../GBPSFC/6-node/__init__.robot | 47 +++- .../demo-asymmetric-chain/000_setup.robot | 5 +- .../005_wait_for_connections.robot | 19 +- .../demo-asymmetric-chain/010_set_odl.robot | 23 +- .../015_wait_for_flows.robot | 25 +- .../031_track_icmp_h35_2_h36_2.robot | 41 ++- .../032_track_icmp_h35_2_h35_3.robot | 41 ++- .../033_track_icmp_h35_4_h36_4.robot | 41 ++- .../034_track_icmp_h36_5_h35_2.robot | 69 +++-- .../035_track_curl_h35_2_h36_2.robot | 151 ++++++++--- .../036_track_curl_h35_3_h36_4.robot | 164 +++++++++--- .../demo-asymmetric-chain/040_show_data.robot | 22 +- .../demo-asymmetric-chain/998_clean_odl.robot | 45 ++-- .../demo-asymmetric-chain/999_teardown.robot | 16 +- .../demo-symmetric-chain/000_setup.robot | 5 +- .../005_wait_for_connections.robot | 19 +- .../demo-symmetric-chain/010_set_odl.robot | 23 +- .../015_wait_for_flows.robot | 25 +- .../031_track_icmp_h35_2_h36_2.robot | 41 ++- .../032_track_icmp_h35_2_h35_3.robot | 41 ++- .../033_track_icmp_h35_4_h36_4.robot | 41 ++- .../034_track_icmp_h36_5_h35_2.robot | 69 +++-- .../035_track_curl_h35_2_h36_2.robot | 244 +++++++++++++++--- .../036_track_curl_h35_3_h36_4.robot | 244 +++++++++++++++--- .../demo-symmetric-chain/040_show_data.robot | 22 +- .../demo-symmetric-chain/998_clean_odl.robot | 45 ++-- .../demo-symmetric-chain/999_teardown.robot | 16 +- .../GBPSXP/ep_provider_register_part.robot | 140 ++++++---- .../GBPSXP/ep_provider_renderer_part.robot | 161 ++++++++---- .../groupbasedpolicy/GBPSXP/ise-adapter.robot | 48 ++-- .../GBP_Basic/010_gbp_endpoint.robot | 26 +- .../GBP_Basic/020_gbp_tenant.robot | 24 +- .../GBP_Basic/030_gbp_tunnel.robot | 30 ++- 60 files changed, 1943 insertions(+), 898 deletions(-) diff --git a/csit/suites/groupbasedpolicy/Clustering_Datastore/020_simple_clustering.robot b/csit/suites/groupbasedpolicy/Clustering_Datastore/020_simple_clustering.robot index d2e5cdf0eb..00180529f5 100644 --- a/csit/suites/groupbasedpolicy/Clustering_Datastore/020_simple_clustering.robot +++ b/csit/suites/groupbasedpolicy/Clustering_Datastore/020_simple_clustering.robot @@ -1,13 +1,16 @@ *** 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 @@ -32,12 +35,13 @@ Read Tenant from other node ${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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/Connections.robot b/csit/suites/groupbasedpolicy/GBP/3-node/Connections.robot index 13ff8a6ad2..08ae7c24ea 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/Connections.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/Connections.robot @@ -1,9 +1,11 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/GBP_3node.robot b/csit/suites/groupbasedpolicy/GBP/3-node/GBP_3node.robot index 92f5d19836..bfa18e392d 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/GBP_3node.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/GBP_3node.robot @@ -1,24 +1,33 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/Variables.robot b/csit/suites/groupbasedpolicy/GBP/3-node/Variables.robot index ea93ea5a4a..1c1107463e 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/Variables.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/Variables.robot @@ -1,28 +1,31 @@ *** 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} diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/__init__.robot b/csit/suites/groupbasedpolicy/GBP/3-node/__init__.robot index a131607b13..0c9f5cbbd9 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/__init__.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/__init__.robot @@ -1,29 +1,48 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/000_setup.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/000_setup.robot index 8d3c392cf9..f885effbc9 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/000_setup.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/000_setup.robot @@ -1,14 +1,17 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot index a7609a2c00..93510a8de4 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot @@ -1,15 +1,17 @@ *** 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 @@ -22,7 +24,7 @@ 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/002_wait_flows.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/002_wait_flows.robot index 5a0d48a3aa..b6420ea529 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/002_wait_flows.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/002_wait_flows.robot @@ -1,21 +1,25 @@ *** 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! diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/010_icmp.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/010_icmp.robot index ea4ed47401..0cf1492b4e 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/010_icmp.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/010_icmp.robot @@ -1,18 +1,23 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/020_http.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/020_http.robot index 2841c05439..e925ccb133 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/020_http.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/020_http.robot @@ -1,18 +1,23 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/040_show_data.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/040_show_data.robot index 5107e43aca..b17460fccb 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/040_show_data.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/040_show_data.robot @@ -1,13 +1,13 @@ *** 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 @@ -29,7 +29,11 @@ Show GBPSFC3 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} diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/998_clean_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/998_clean_odl.robot index 9ae6682b54..d79664b01e 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/998_clean_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/998_clean_odl.robot @@ -1,17 +1,19 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/999_teardown.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/999_teardown.robot index fb0b4677b8..480e59451e 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/999_teardown.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/999_teardown.robot @@ -1,14 +1,17 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/000_setup.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/000_setup.robot index 59d4c2069b..b0095fc3db 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/000_setup.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/000_setup.robot @@ -1,14 +1,17 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot index 8e4e6dd10c..c62321d89c 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot @@ -1,15 +1,17 @@ *** 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 @@ -22,7 +24,7 @@ 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/002_wait_flows.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/002_wait_flows.robot index e715817c06..a4d0dcde50 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/002_wait_flows.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/002_wait_flows.robot @@ -1,21 +1,25 @@ *** 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! diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/010_icmp.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/010_icmp.robot index 876c3f22fe..fb9c6711a4 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/010_icmp.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/010_icmp.robot @@ -1,22 +1,36 @@ *** 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". @@ -175,8 +189,18 @@ Tenant 1 Different switches, stop endless ping from h35_2 to h36_2 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) diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/020_http.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/020_http.robot index e26e24e96f..c36d73ceb9 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/020_http.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/020_http.robot @@ -1,24 +1,38 @@ *** 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) @@ -206,8 +220,18 @@ Tenant 1 Different switches, stop SimpleHttpServer on h36_2 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) diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/040_show_data.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/040_show_data.robot index 5107e43aca..b17460fccb 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/040_show_data.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/040_show_data.robot @@ -1,13 +1,13 @@ *** 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 @@ -29,7 +29,11 @@ Show GBPSFC3 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} diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/998_clean_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/998_clean_odl.robot index 3654e18992..c4d7701412 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/998_clean_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/998_clean_odl.robot @@ -1,17 +1,19 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/999_teardown.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/999_teardown.robot index 8d66abeb3b..edc90deed3 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/999_teardown.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/999_teardown.robot @@ -1,14 +1,17 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP/Devstack/01__wait_for_odl.robot b/csit/suites/groupbasedpolicy/GBP/Devstack/01__wait_for_odl.robot index 331b08686e..0454aa62e2 100644 --- a/csit/suites/groupbasedpolicy/GBP/Devstack/01__wait_for_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/Devstack/01__wait_for_odl.robot @@ -1,15 +1,16 @@ *** 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 @@ -17,10 +18,11 @@ 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} diff --git a/csit/suites/groupbasedpolicy/GBP/Devstack/02__neutron-mapper_test.robot b/csit/suites/groupbasedpolicy/GBP/Devstack/02__neutron-mapper_test.robot index 047dd06841..16922f00c9 100644 --- a/csit/suites/groupbasedpolicy/GBP/Devstack/02__neutron-mapper_test.robot +++ b/csit/suites/groupbasedpolicy/GBP/Devstack/02__neutron-mapper_test.robot @@ -1,49 +1,53 @@ *** 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} @@ -64,25 +68,26 @@ Test Create Network 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. diff --git a/csit/suites/groupbasedpolicy/GBP/Devstack/Variables.robot b/csit/suites/groupbasedpolicy/GBP/Devstack/Variables.robot index 4f280a5e62..591c09f9e7 100644 --- a/csit/suites/groupbasedpolicy/GBP/Devstack/Variables.robot +++ b/csit/suites/groupbasedpolicy/GBP/Devstack/Variables.robot @@ -1,18 +1,20 @@ *** 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} diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/Connections.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/Connections.robot index d3916667b3..9952de6181 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/Connections.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/Connections.robot @@ -1,9 +1,10 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/GBPSFC_6node.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/GBPSFC_6node.robot index 1686c56754..c19a190fd0 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/GBPSFC_6node.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/GBPSFC_6node.robot @@ -1,42 +1,60 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/Variables.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/Variables.robot index 817adf70ec..a7cd753ae0 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/Variables.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/Variables.robot @@ -1,44 +1,51 @@ *** 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} @@ -57,8 +64,18 @@ Set ODL Variables Master [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/ diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot index 27f85830dd..9c857801cf 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot @@ -1,30 +1,49 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/000_setup.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/000_setup.robot index fffd7b9b7b..73333ab378 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/000_setup.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/000_setup.robot @@ -1,6 +1,7 @@ *** Settings *** -Resource ../Variables.robot -Resource ../GBPSFC_6node.robot +Resource ../Variables.robot +Resource ../GBPSFC_6node.robot + *** Test Cases *** Initialize Nodes diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/005_wait_for_connections.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/005_wait_for_connections.robot index f1315365a7..c571be7240 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/005_wait_for_connections.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/005_wait_for_connections.robot @@ -1,12 +1,15 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot index 61746484f3..56340ccf38 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot @@ -1,13 +1,16 @@ *** 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 @@ -59,7 +62,7 @@ Put Tenant 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/015_wait_for_flows.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/015_wait_for_flows.robot index a9c58cac7a..b85d73e559 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/015_wait_for_flows.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/015_wait_for_flows.robot @@ -1,15 +1,18 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/031_track_icmp_h35_2_h36_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/031_track_icmp_h35_2_h36_2.robot index 95c74e84b8..c31a6392a9 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/031_track_icmp_h35_2_h36_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/031_track_icmp_h35_2_h36_2.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h35_2 to h36_2 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/032_track_icmp_h35_2_h35_3.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/032_track_icmp_h35_2_h35_3.robot index be10e1882d..b5e823bccb 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/032_track_icmp_h35_2_h35_3.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/032_track_icmp_h35_2_h35_3.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h35_2 to h35_3 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/033_track_icmp_h35_4_h36_4.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/033_track_icmp_h35_4_h36_4.robot index 5424519acf..d0a02d5317 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/033_track_icmp_h35_4_h36_4.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/033_track_icmp_h35_4_h36_4.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h36_4 to h35_4 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/034_track_icmp_h36_5_h35_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/034_track_icmp_h36_5_h35_2.robot index eab6c9c2b8..46eb0da05c 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/034_track_icmp_h36_5_h35_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/034_track_icmp_h36_5_h35_2.robot @@ -1,19 +1,26 @@ *** 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} @@ -25,26 +32,52 @@ Start Endless Ping from h36_5 to h35_2 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/035_track_curl_h35_2_h36_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/035_track_curl_h35_2_h36_2.robot index 4a8865657e..5c9e0264a0 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/035_track_curl_h35_2_h36_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/035_track_curl_h35_2_h36_2.robot @@ -1,21 +1,29 @@ *** 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} @@ -30,58 +38,139 @@ Start Endless Curl on h35_2 on port 80 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/036_track_curl_h35_3_h36_4.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/036_track_curl_h35_3_h36_4.robot index e54aca1fe3..784f0f6c4b 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/036_track_curl_h35_3_h36_4.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/036_track_curl_h35_3_h36_4.robot @@ -1,21 +1,30 @@ *** 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} @@ -31,64 +40,153 @@ Start Endless Curl on h35_3 on port 80 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/040_show_data.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/040_show_data.robot index 49408b1e94..2c3093564b 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/040_show_data.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/040_show_data.robot @@ -1,13 +1,13 @@ *** 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 @@ -44,7 +44,11 @@ Show GBPSFC6 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} diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/998_clean_odl.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/998_clean_odl.robot index f9c9b61ea0..65e3389adb 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/998_clean_odl.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/998_clean_odl.robot @@ -1,54 +1,59 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/999_teardown.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/999_teardown.robot index 86d9de2d6e..8ba338c594 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/999_teardown.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/999_teardown.robot @@ -1,13 +1,15 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/000_setup.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/000_setup.robot index fffd7b9b7b..73333ab378 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/000_setup.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/000_setup.robot @@ -1,6 +1,7 @@ *** Settings *** -Resource ../Variables.robot -Resource ../GBPSFC_6node.robot +Resource ../Variables.robot +Resource ../GBPSFC_6node.robot + *** Test Cases *** Initialize Nodes diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/005_wait_for_connections.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/005_wait_for_connections.robot index 42475c4a27..0cb5984927 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/005_wait_for_connections.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/005_wait_for_connections.robot @@ -1,12 +1,15 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/010_set_odl.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/010_set_odl.robot index 18ea63ba30..da26e120a2 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/010_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/010_set_odl.robot @@ -1,13 +1,16 @@ *** 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 @@ -59,7 +62,7 @@ Put Tenant 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/015_wait_for_flows.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/015_wait_for_flows.robot index a9c58cac7a..b85d73e559 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/015_wait_for_flows.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/015_wait_for_flows.robot @@ -1,15 +1,18 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/031_track_icmp_h35_2_h36_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/031_track_icmp_h35_2_h36_2.robot index 95c74e84b8..c31a6392a9 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/031_track_icmp_h35_2_h36_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/031_track_icmp_h35_2_h36_2.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h35_2 to h36_2 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/032_track_icmp_h35_2_h35_3.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/032_track_icmp_h35_2_h35_3.robot index be10e1882d..b5e823bccb 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/032_track_icmp_h35_2_h35_3.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/032_track_icmp_h35_2_h35_3.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h35_2 to h35_3 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/033_track_icmp_h35_4_h36_4.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/033_track_icmp_h35_4_h36_4.robot index 5424519acf..d0a02d5317 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/033_track_icmp_h35_4_h36_4.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/033_track_icmp_h35_4_h36_4.robot @@ -1,19 +1,26 @@ *** 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} @@ -24,13 +31,23 @@ Start Endless Ping from h36_4 to h35_4 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/034_track_icmp_h36_5_h35_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/034_track_icmp_h36_5_h35_2.robot index eab6c9c2b8..46eb0da05c 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/034_track_icmp_h36_5_h35_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/034_track_icmp_h36_5_h35_2.robot @@ -1,19 +1,26 @@ *** 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} @@ -25,26 +32,52 @@ Start Endless Ping from h36_5 to h35_2 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/035_track_curl_h35_2_h36_2.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/035_track_curl_h35_2_h36_2.robot index f2c4157ea3..2883361bc9 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/035_track_curl_h35_2_h36_2.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/035_track_curl_h35_2_h36_2.robot @@ -1,20 +1,28 @@ *** 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} @@ -29,102 +37,252 @@ Start Endless Curl on h35_2 on port 80 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/036_track_curl_h35_3_h36_4.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/036_track_curl_h35_3_h36_4.robot index 9583059623..6db92f1230 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/036_track_curl_h35_3_h36_4.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/036_track_curl_h35_3_h36_4.robot @@ -1,20 +1,28 @@ *** 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} @@ -30,102 +38,252 @@ Start Endless Curl on h35_3 on port 80 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. diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/040_show_data.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/040_show_data.robot index 49408b1e94..2c3093564b 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/040_show_data.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/040_show_data.robot @@ -1,13 +1,13 @@ *** 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 @@ -44,7 +44,11 @@ Show GBPSFC6 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} diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/998_clean_odl.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/998_clean_odl.robot index dcf8cf9c5c..85a587313d 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/998_clean_odl.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/998_clean_odl.robot @@ -1,54 +1,59 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/999_teardown.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/999_teardown.robot index 2c386c2b31..9ade7001b5 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/999_teardown.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-symmetric-chain/999_teardown.robot @@ -1,13 +1,15 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_register_part.robot b/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_register_part.robot index dda330bb1c..9bfc54ba58 100644 --- a/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_register_part.robot +++ b/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_register_part.robot @@ -1,28 +1,32 @@ *** 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 @@ -37,7 +41,10 @@ Register_EP_Using_Manual_Inputs_And_Ise [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} @@ -46,68 +53,113 @@ Register_EP_Using_Manual_Inputs_And_Ise 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} diff --git a/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_renderer_part.robot b/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_renderer_part.robot index 91bb35b6be..0e828ce4ad 100644 --- a/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_renderer_part.robot +++ b/csit/suites/groupbasedpolicy/GBPSXP/ep_provider_renderer_part.robot @@ -1,41 +1,55 @@ *** 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']} @@ -49,13 +63,24 @@ Configure_Sfc_And_Ios_Xe_Renderer_Using_Existing_Sgt 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 @@ -67,11 +92,18 @@ Setup_Http_And_Netconf 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 @@ -89,14 +121,29 @@ Prepare_Renderer_Prerequisities 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} @@ -107,11 +154,13 @@ Prepare_Renderer_Prerequisities 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 @@ -122,42 +171,54 @@ Wipe_Clean_Renderer_Policy_Cohort 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} diff --git a/csit/suites/groupbasedpolicy/GBPSXP/ise-adapter.robot b/csit/suites/groupbasedpolicy/GBPSXP/ise-adapter.robot index 4549afdd05..51ca8cb1b2 100644 --- a/csit/suites/groupbasedpolicy/GBPSXP/ise-adapter.robot +++ b/csit/suites/groupbasedpolicy/GBPSXP/ise-adapter.robot @@ -1,30 +1,37 @@ *** 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} @@ -33,10 +40,15 @@ Configure_Ise_Source_And_Check_Results ${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} diff --git a/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot b/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot index 757652793d..109d06bdd9 100644 --- a/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot +++ b/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot @@ -1,17 +1,21 @@ *** 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 diff --git a/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot b/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot index 8cf76167fa..dcf2c4d369 100644 --- a/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot +++ b/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot @@ -1,14 +1,17 @@ *** 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 @@ -65,6 +68,7 @@ Clean Datastore After Tests [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 diff --git a/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot b/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot index 1c6e64ca15..6376b82baf 100644 --- a/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot +++ b/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot @@ -1,19 +1,23 @@ *** 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 -- 2.36.6