Test cases for Bug 8882 36/62536/15
authorAswin Suryanarayanan <asuryana@redhat.com>
Fri, 1 Sep 2017 10:41:38 +0000 (16:11 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 16 Mar 2018 18:12:21 +0000 (18:12 +0000)
Tests the PNF connectivity from SNAT vm

Change-Id: I3a181da8c70f618a83767f940995245f5b510b48
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/Tempest.robot
csit/suites/openstack/connectivity/external_network.robot

index 88344602d7eb9ed8a2e3a5c5386dc1d24b7ae138..ebe75154ab00e80863ee1b382a6e99bab78e3155 100644 (file)
@@ -35,6 +35,7 @@ Run Tempest Tests Without Debug
     ...    explicitly set to False.
     BuiltIn.Return From Keyword If    "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS}
     BuiltIn.Return From Keyword If    "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS}
+    BuiltIn.Return From Keyword If    "skip_if_${ODL_SNAT_MODE}" in @{TEST_TAGS}
     ${tempest_conn_id} =    SSHLibrary.Open Connection    ${OS_CONTROL_NODE_IP}    prompt=${DEFAULT_LINUX_PROMPT_STRICT}
     SSHKeywords.Flexible SSH Login    ${OS_USER}    ${DEVSTACK_SYSTEM_PASSWORD}
     DevstackUtils.Write Commands Until Prompt    source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
@@ -57,6 +58,7 @@ Run Tempest Tests With Debug
     ...    test cases with a single command. Essentially, this keyword only handles one breakpoint at a single teardown.
     BuiltIn.Return From Keyword If    "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS}
     BuiltIn.Return From Keyword If    "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS}
+    BuiltIn.Return From Keyword If    "skip_if_${ODL_SNAT_MODE}" in @{TEST_TAGS}
     ${tempest_conn_id} =    SSHLibrary.Open Connection    ${OS_CONTROL_NODE_IP}    prompt=${DEFAULT_LINUX_PROMPT_STRICT}
     SSHKeywords.Flexible SSH Login    ${OS_USER}    ${DEVSTACK_SYSTEM_PASSWORD}
     DevstackUtils.Write Commands Until Prompt    source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
index 924c59108c3e07e2ea28b9e1e24ba7d39efcc0a2..85aafb7bdefa7e1fbd6403c9a8fc2a21e7c074ff 100644 (file)
@@ -4,6 +4,7 @@ Suite Setup       OpenStackOperations.OpenStack Suite Setup
 Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     OpenStackOperations.Get Test Teardown Debugs
+Force Tags        skip_if_${ODL_SNAT_MODE}
 Library           Collections
 Library           SSHLibrary
 Library           OperatingSystem
@@ -156,6 +157,18 @@ SNAT - UDP connection to External Gateway From SNAT VM Instance3
     [Documentation]    Login to the VM instance and test UDP connection to the controller via SNAT
     OpenStackOperations.Test Netcat Operations From Vm Instance    @{NETWORKS}[1]    @{NET2_SNAT_VM_IPS}[0]    ${EXTERNAL_GATEWAY}    -u
 
+Ping External Network PNF from SNAT VM Instance1
+    [Documentation]    Check reachability of External Network PNF from SNAT VM Instance1
+    ${expect_ping_to_work} =    Set Variable If    "skip_if_controller" in @{TEST_TAGS}    False    True
+    ${dst_ip} =    BuiltIn.Create List    ${EXTERNAL_PNF}
+    OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[0]    @{NET1_SNAT_VM_IPS}[0]    ${dst_ip}    ping_should_succeed=${expect_ping_to_work}
+
+Ping External Network PNF from SNAT VM Instance2
+    [Documentation]    Check reachability of External Network PNF from SNAT VM Instance2
+    ${expect_ping_to_work} =    Set Variable If    "skip_if_controller" in @{TEST_TAGS}    False    True
+    ${dst_ip} =    BuiltIn.Create List    ${EXTERNAL_PNF}
+    OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[0]    @{NET1_SNAT_VM_IPS}[1]    ${dst_ip}    ping_should_succeed=${expect_ping_to_work}
+
 Delete Vm Instances
     [Documentation]    Delete Vm instances using instance names.
     : FOR    ${vm}    IN    @{NET1_FIP_VMS}