Modification on SFC test Cases
[integration/test.git] / csit / suites / openstack / extensions / sfc.robot
index 28e712bf879b06a00827dad507ab22c3b4811513..f01fad72b927f29f264864f99a5d5b80637d0fbd 100644 (file)
 *** Settings ***
 Documentation     Test suite to verify SFC configuration and packet flows.
-Suite Setup       BuiltIn.Run Keywords    SetupUtils.Setup_Utils_For_Setup_And_Teardown
-...               AND    DevstackUtils.Devstack Suite Setup
-Suite Teardown    Close All Connections
+Suite Setup       Suite Setup
+Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     Get Test Teardown Debugs
+Test Teardown     BuiltIn.Run Keywords    OpenStackOperations.Get Test Teardown Debugs
+...               AND    OpenStackOperations.Get Test Teardown Debugs For SFC
 Library           SSHLibrary
 Library           OperatingSystem
 Library           RequestsLibrary
 Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/LiveMigration.robot
 Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/SetupUtils.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/KarafKeywords.robot
 
 *** Variables ***
-@{NETWORKS_NAME}    network_1
-@{SUBNETS_NAME}    l2_subnet_1
-@{VM_INSTANCES}    sf1    sf2    sf3    source_vm    dest_vm
-@{SUBNETS_RANGE}    30.0.0.0/24
-@{PORTS}          p1in    p1out    p2in    p2out    p3in    p3out    source_vm_port
-...               dest_vm_port
+${SECURITY_GROUP}    sg-sfc
+@{NETWORKS}       network_1
+@{SUBNETS}        l2_subnet_1
+@{NET_1_VMS}      sf1    sourcevm    destvm
+@{NON_SF_VMS}     sourcevm    destvm
+@{SUBNET_CIDRS}    30.0.0.0/24
+@{PORTS}          p1in    p1out    source_vm_port    dest_vm_port
+${NC_COMMAND}     nc -zv -w 5
+${RES_SUCCESS}    open
+${RES_FAILURE}    Operation timed out
+${WEBSERVER_80}    python -m SimpleHTTPServer 80 > /dev/null 2>&1 &
+${WEBSERVER_81}    python -m SimpleHTTPServer 81 > /dev/null 2>&1 &
+${WEBSERVER_82}    python -m SimpleHTTPServer 82 > /dev/null 2>&1 &
+${CLOUD_IMAGE}    "https://artifacts.opnfv.org/sfc/images/sfc_nsh_fraser.qcow2"
+${CLOUD_IMAGE_NAME}    sfc_nsh_fraser
+${CLOUD_FLAVOR_NAME}    sfc_nsh_fraser
+@{NETVIRT_DIAG_SERVICES}    OPENFLOW    IFM    ITM    DATASTORE    ELAN
+${ETH_IN}         eth0
+${ETH_OUT}        eth1
+${CLOUD_IMAGE_USER}    root
+${CLOUD_IMAGE_PASS}    opnfv
+${CLOULD_IMAGE_CONSOLE}    root
 
 *** Test Cases ***
-Create VXLAN Network (network_1)
-    [Documentation]    Create Network with neutron request.
-    Create Network    @{NETWORKS_NAME}[0]
-
-Create Subnets For network_1
-    [Documentation]    Create Sub Nets for the Networks with neutron request.
-    Create SubNet    @{NETWORKS_NAME}[0]    @{SUBNETS_NAME}[0]    @{SUBNETS_RANGE}[0]
-
-Add Allow All Rules
-    [Documentation]    Allow all packets for this suite
-    Neutron Security Group Create    sg-sfc
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=tcp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=tcp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=udp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=udp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    protocol=icmp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    protocol=icmp    remote_ip_prefix=0.0.0.0/0
-
-Create Neutron Ports
-    [Documentation]    Precreate neutron ports to be used for SFC VMs
-    : FOR    ${port}    IN    @{PORTS}
-    \    Create Port    @{NETWORKS_NAME}[0]    ${port}    sg=sg-sfc
-
-Create Vm Instances
-    [Documentation]    Create Four Vm instances using flavor and image names for a network.
-    Create Vm Instance With Ports    p1in    p1out    sf1    sg=sg-sfc
-    Create Vm Instance With Ports    p2in    p2out    sf2    sg=sg-sfc
-    Create Vm Instance With Ports    p3in    p3out    sf3    sg=sg-sfc
-    Create Vm Instance With Port    source_vm_port    source_vm    sg=sg-sfc
-    Create Vm Instance With Port    dest_vm_port    dest_vm    sg=sg-sfc
-
-Check Vm Instances Have Ip Address
-    [Documentation]    Test case to verify that all created VMs are ready and have received their ip addresses.
-    ...    We are polling first and longest on the last VM created assuming that if it's received it's address
-    ...    already the other instances should have theirs already or at least shortly thereafter.
-    # first, ensure all VMs are in ACTIVE state.    if not, we can just fail the test case and not waste time polling
-    # for dhcp addresses
-    : FOR    ${vm}    IN    @{VM_INSTANCES}
-    \    Wait Until Keyword Succeeds    15s    5s    Verify VM Is ACTIVE    ${vm}
-    ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    5s    Collect VM IP Addresses
-    ...    true    @{VM_INSTANCES}
-    ${NET1_VM_IPS}    ${NET1_DHCP_IP}    Collect VM IP Addresses    false    @{VM_INSTANCES}
-    ${VM_INSTANCES}=    Collections.Combine Lists    ${VM_INSTANCES}
-    ${VM_IPS}=    Collections.Combine Lists    ${NET1_VM_IPS}
-    ${LOOP_COUNT}    Get Length    ${VM_INSTANCES}
-    : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-    \    ${status}    ${message}    Run Keyword And Ignore Error    Should Not Contain    @{VM_IPS}[${index}]    None
-    \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{VM_INSTANCES}[${index}]    30s
-    Set Suite Variable    ${NET1_VM_IPS}
-    Should Not Contain    ${NET1_VM_IPS}    None
-    Should Not Contain    ${NET1_DHCP_IP}    None
-    [Teardown]    Run Keywords    Show Debugs    @{VM_INSTANCES}
-    ...    AND    Get Test Teardown Debugs
-
-Create Flow Classifiers
+Create Flow Classifiers For Basic Test
     [Documentation]    Create SFC Flow Classifier for TCP traffic between source VM and destination VM
-    Create SFC Flow Classifier    FC_http    @{NET1_VM_IPS}[3]    @{NET1_VM_IPS}[4]    tcp    80    source_vm_port
+    OpenStackOperations.Create SFC Flow Classifier    FC_80    @{NET1_VM_IPS}[0]    @{NET1_VM_IPS}[1]    tcp    source_vm_port    args=--destination-port 80:80
+    OpenStackOperations.Create SFC Flow Classifier    FC_81    @{NET1_VM_IPS}[0]    @{NET1_VM_IPS}[1]    tcp    source_vm_port    args=--destination-port 81:81
 
-Create Port Pairs
+Create Port Pair
     [Documentation]    Create SFC Port Pairs
-    Create SFC Port Pair    PP1    p1in    p1out
-    Create SFC Port Pair    PP2    p2in    p2out
-    Create SFC Port Pair    PP3    p3in    p3out
+    OpenStackOperations.Create SFC Port Pair    SFPP1    p1in    p1out
 
 Create Port Pair Groups
     [Documentation]    Create SFC Port Pair Groups
-    Create SFC Port Pair Group With Two Pairs    PG1    PP1    PP2
-    Create SFC Port Pair Group    PG2    PP3
-
-Create Port Chain
-    [Documentation]    Create SFC Port Chain using two port groups an classifier created previously
-    Create SFC Port Chain    PC1    PG1    PG2    FC_http
-
-Start Web Server On Destination VM
-    [Documentation]    Start a simple web server on the destination VM
-    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[4]    while true; do echo -e "HTTP/1.0 200 OK\r\nContent-Length: 21\r\n\r\nWelcome to web-server" | sudo nc -l -p 80 ; done &
-
-Add Static Routing On Service Function VMs
-    [Documentation]    Enable eth1 and add static routing between the ports on the SF VMs
-    : FOR    ${INDEX}    IN RANGE    0    2
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo sh -c 'echo "auto eth1" >> /etc/network/interfaces'
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo sh -c 'echo "iface eth1 inet dhcp" >> /etc/network/interfaces'
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo /etc/init.d/S40network restart
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo ip route add @{NET1_VM_IPS}[3] dev eth0
-    \    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[${INDEX}]    sudo ip route add @{NET1_VM_IPS}[4] dev eth1
-
-Connectivity Tests From Vm Instance1 In network_1
-    [Documentation]    Login to the source VM instance, and send a HTTP GET using curl to the destination VM instance
-    # FIXME need to somehow verify it goes through SFs (flows?)
-    ${DEST_VM_LIST}    Create List    @{NET1_VM_IPS}[4]
-    Test Operations From Vm Instance    network_1    @{NET1_VM_IPS}[3]    ${DEST_VM_LIST}
-    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[3]    curl http://@{NET1_VM_IPS}[4]
-
-Delete Vm Instances In network_1
-    [Documentation]    Delete Vm instances using instance names in network_1.
-    : FOR    ${VmElement}    IN    @{VM_INSTANCES}
-    \    Delete Vm Instance    ${VmElement}
-
-Delete All SFC Objects
-    [Documentation]    Delete all previously created SFC objects
-    Delete SFC Port Chain    PC1
-    Delete SFC Port Pair Group    PG1
-    Delete SFC Port Pair Group    PG2
-    Delete SFC Port Pair    PP1
-    Delete SFC Port Pair    PP2
-    Delete SFC Port Pair    PP3
-    Delete SFC Flow Classifier    FC_http
-
-Delete Neutron Ports
-    [Documentation]    Delete neutron ports that were used for SFC VMs
+    OpenStackOperations.Create SFC Port Pair Group    SFPPG1    SFPP1
+
+Test Communication From Vm Instance1 In net_1 No SF
+    [Documentation]    Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+    ${DEST_VM_LIST}    BuiltIn.Create List    @{NET1_VM_IPS}[1]
+    ${nc_resp}    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} @{NET1_VM_IPS}[1] 80    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}
+    ...    console=${CLOULD_IMAGE_CONSOLE}
+    BuiltIn.Should Contain    ${nc_resp}    ${RES_SUCCESS}
+    ${nc_resp}    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} @{NET1_VM_IPS}[1] 81    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}
+    ...    console=${CLOULD_IMAGE_CONSOLE}
+    BuiltIn.Should Contain    ${nc_resp}    ${RES_SUCCESS}
+    [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Get Test Teardown Debugs
+    ...    AND    OpenStackOperations.Get Test Teardown Debugs For SFC
+    ...    AND    OpenStackOperations.Exit From Vm Console
+
+Create Port Chain For Src->Dest Port 80
+    [Documentation]    Create SFC Port Chain using port group and classifier created previously
+    OpenStackOperations.Create SFC Port Chain    SFPC1    args=--port-pair-group SFPPG1 --flow-classifier FC_80
+
+Test Communication From Vm Instance1 In net_1 Port 80 via SF
+    [Documentation]    Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_SUCCESS}
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_SUCCESS}
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
+    BuiltIn.Comment    Port 80 communication should fail as the SF blocks the same
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_FAILURE}
+    BuiltIn.Comment    Test to confirm Port 81 is not blocked
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_SUCCESS}
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_SUCCESS}
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_SUCCESS}
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Get Test Teardown Debugs
+    ...    AND    OpenStackOperations.Get Test Teardown Debugs For SFC
+    ...    AND    OpenStackOperations.Exit From Vm Console
+
+Update Port Chain To Use Flow Classifier For Port 81
+    [Documentation]    Update Port Chain to use FC_81 instead of FC_80
+    OpenStackOperations.Update SFC Port Chain With A New Flow Classifier    SFPC1    FC_81
+    OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier    SFPC1    FC_80
+
+Test Communication From Vm Instance1 In net_1 Port 81 via SF
+    [Documentation]    Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_SUCCESS}
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_SUCCESS}    cmd_timeout=60s
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
+    BuiltIn.Comment    Port 81 communication should fail as the SF blocks the same
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_SUCCESS}
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_FAILURE}    cmd_timeout=60s
+    BuiltIn.Comment    Test to confirm Port 80 does not continue to get routed through SF
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    80    ${RES_SUCCESS}
+    Wait Until Keyword Succeeds    3x    10s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND}
+    ...    81    ${RES_SUCCESS}    cmd_timeout=60s
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Get Test Teardown Debugs
+    ...    AND    OpenStackOperations.Get Test Teardown Debugs For SFC
+    ...    AND    OpenStackOperations.Exit From Vm Console
+
+Delete And Recreate Port Chain And Flow Classifiers For Symmetric Test
+    OpenStackOperations.Create SFC Flow Classifier    FC_SYM    @{NET1_VM_IPS}[0]    @{NET1_VM_IPS}[1]    tcp    source_vm_port    args=--destination-port 82:82 --source-port 2000 --logical-destination-port dest_vm_port
+    OpenStackOperations.Delete SFC Port Chain    SFPC1
+    OpenStackOperations.Create SFC Port Chain    SFPSYM    args=--port-pair-group SFPPG1 --flow-classifier FC_SYM --chain-parameters symmetric=true
+
+Test Communication From Vm Instance1 For Symmetric Chain
+    [Documentation]    Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+    Wait Until Keyword Succeeds    8x    20s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} -p 2000
+    ...    82    ${RES_SUCCESS}    cmd_timeout=80s
+    BuiltIn.Comment    Test to confirm the SRC->DEST Port 82 is routed through SF
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 82
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+    Wait Until Keyword Succeeds    8x    20s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} -p 2000
+    ...    82    ${RES_FAILURE}    cmd_timeout=80s
+    BuiltIn.Comment    Test to confirm DEST->SRC Port 2000 path SFC traversal
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off --block 2000
+    Wait Until Keyword Succeeds    8x    20s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} -p 2000
+    ...    82    ${RES_FAILURE}    cmd_timeout=80s
+    BuiltIn.Comment    Test to confirm the Normalcy restored
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+    Start Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}    args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+    Wait Until Keyword Succeeds    8x    20s    Check Network Reachability    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    ${NC_COMMAND} -p 2000
+    ...    82    ${RES_SUCCESS}    cmd_timeout=80s
+    Stop Vxlan Tool in SF    @{NETWORKS}[0]    ${SF1_IP}
+    [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Get Test Teardown Debugs
+    ...    AND    OpenStackOperations.Get Test Teardown Debugs For SFC
+    ...    AND    OpenStackOperations.Exit From Vm Console
+
+Delete Configurations
+    [Documentation]    Delete all elements that were created in the test case section. These are done
+    ...    in a local keyword so this can be called as part of the Suite Teardown. When called as part
+    ...    of the Suite Teardown, all steps will be attempted. This prevents robot framework from bailing
+    ...    on the rest of a test case if one step intermittently has trouble and fails. The goal is to attempt
+    ...    to leave the test environment as clean as possible upon completion of this suite.
+    : FOR    ${vm}    IN    @{NET_1_VMS}
+    \    OpenStackOperations.Delete Vm Instance    ${vm}
+    OpenStackOperations.Delete SFC Port Chain    SFPSYM
+    OpenStackOperations.Delete SFC Port Pair Group    SFPPG1
+    OpenStackOperations.Delete SFC Port Pair    SFPP1
+    OpenStackOperations.Delete SFC Flow Classifier    FC_80
+    OpenStackOperations.Delete SFC Flow Classifier    FC_81
+    OpenStackOperations.Delete SFC Flow Classifier    FC_SYM
     : FOR    ${port}    IN    @{PORTS}
-    \    Delete Port    ${port}
+    \    OpenStackOperations.Delete Port    ${port}
+    OpenStackOperations.Delete SubNet    l2_subnet_1
+    : FOR    ${network}    IN    @{NETWORKS}
+    \    OpenStackOperations.Delete Network    ${network}
+    OpenStackOperations.Delete SecurityGroup    ${SECURITY_GROUP}
+
+*** Keywords ***
+Suite Setup
+    OpenStackOperations.OpenStack Suite Setup
+    Create Basic Networks
+    Create Ports For Testing
+    Create Instances For Testing
+    Check Vm Instances Have Ip Address And Ready For Test
+    Start Applications on VM Instances For Test
+
+Create Basic Networks
+    BuiltIn.Comment    Create Network For Testing
+    OpenStackOperations.Create Network    @{NETWORKS}[0]
+    BuiltIn.Comment    Create Subnet For Testing
+    OpenStackOperations.Create SubNet    @{NETWORKS}[0]    @{SUBNETS}[0]    @{SUBNET_CIDRS}[0]
+    OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
+    BuiltIn.Comment    Create Neutron Ports with no port security for SFC Tests
+    OpenStackOperations.Get Suite Debugs
+
+Create Ports For Testing
+    : FOR    ${port}    IN    @{PORTS}
+    \    OpenStackOperations.Create Port    @{NETWORKS}[0]    ${port}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Update Port    p1in    additional_args=--no-security-group
+    OpenStackOperations.Update Port    p1in    additional_args=--disable-port-security
+    OpenStackOperations.Update Port    p1out    additional_args=--no-security-group
+    OpenStackOperations.Update Port    p1out    additional_args=--disable-port-security
+    CompareStream.Run_Keyword_If_Equals    oxygen    OpenStackOperations.Update Port    source_vm_port    additional_args=--no-security-group
+    CompareStream.Run_Keyword_If_Equals    oxygen    OpenStackOperations.Update Port    source_vm_port    additional_args=--disable-port-security
+    CompareStream.Run_Keyword_If_Equals    oxygen    OpenStackOperations.Update Port    dest_vm_port    additional_args=--no-security-group
+    CompareStream.Run_Keyword_If_Equals    oxygen    OpenStackOperations.Update Port    dest_vm_port    additional_args=--disable-port-security
+    OpenStackOperations.Get Suite Debugs
+
+Create Instances For Testing
+    ${SF_COMP_HOST} =    BuiltIn.Set Variable If    2 < ${NUM_OS_SYSTEM}    ${OS_CMP2_HOSTNAME}    ${OS_CMP1_HOSTNAME}
+    OpenStackOperations.Add New Image From Url    ${CLOUD_IMAGE}    ${CLOUD_IMAGE_NAME}
+    OpenStackOperations.Create Flavor    ${CLOUD_FLAVOR_NAME}    512    1
+    OpenStackOperations.Create Vm Instance With Ports On Compute Node    p1in    p1out    sf1    ${SF_COMP_HOST}    image=${CLOUD_IMAGE_NAME}    flavor=${CLOUD_FLAVOR_NAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    source_vm_port    sourcevm    ${OS_CMP1_HOSTNAME}    image=${CLOUD_IMAGE_NAME}    flavor=${CLOUD_FLAVOR_NAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    dest_vm_port    destvm    ${OS_CMP1_HOSTNAME}    image=${CLOUD_IMAGE_NAME}    flavor=${CLOUD_FLAVOR_NAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Show Debugs    @{NET_1_VMS}
+    OpenStackOperations.Get Suite Debugs
+
+Check Vm Instances Have Ip Address And Ready For Test
+    OpenStackOperations.Poll VM Is ACTIVE    sf1
+    OpenStackOperations.Poll VM Is ACTIVE    sourcevm
+    OpenStackOperations.Poll VM Is ACTIVE    destvm
+    ${sfc1_mac}    OpenStackOperations.Get Port Mac    p1in
+    ${SF1_IP}    OpenStackOperations.Get Port Ip    p1in
+    BuiltIn.Wait Until Keyword Succeeds    500s    60s    OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace    @{NETWORKS}[0]    ${sfc1_mac}    ${SF1_IP}
+    ${src_mac}    OpenStackOperations.Get Port Mac    source_vm_port
+    ${src_ip}    OpenStackOperations.Get Port Ip    source_vm_port
+    BuiltIn.Wait Until Keyword Succeeds    500s    60s    OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace    @{NETWORKS}[0]    ${src_mac}    ${src_ip}
+    ${dest_mac}    OpenStackOperations.Get Port Mac    dest_vm_port
+    ${dest_ip}    OpenStackOperations.Get Port Ip    dest_vm_port
+    BuiltIn.Wait Until Keyword Succeeds    500s    60s    OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace    @{NETWORKS}[0]    ${dest_mac}    ${dest_ip}
+    BuiltIn.Comment    If the Tests reach this point, all the Instances are reachable.
+    ${NET1_VM_IPS}    BuiltIn.Create List    ${src_ip}    ${dest_ip}
+    BuiltIn.Set Suite Variable    @{NET1_VM_IPS}
+    BuiltIn.Set Suite Variable    ${SF1_IP}
+    BuiltIn.Set Suite Variable    ${OS_SYSTEM_PROMPT}    \#
+    BuiltIn.Wait Until Keyword Succeeds    300s    60s    OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password    @{NETWORKS}[0]    ${SF1_IP}    user=${CLOUD_IMAGE_USER}
+    ...    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    BuiltIn.Wait Until Keyword Succeeds    300s    60s    OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password    @{NETWORKS}[0]    @{NET1_VM_IPS}[0]    user=${CLOUD_IMAGE_USER}
+    ...    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    BuiltIn.Wait Until Keyword Succeeds    300s    60s    OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password    @{NETWORKS}[0]    @{NET1_VM_IPS}[1]    user=${CLOUD_IMAGE_USER}
+    ...    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    OpenStackOperations.Show Debugs    @{NET_1_VMS}
+    OpenStackOperations.Get Suite Debugs
+
+Start Applications on VM Instances For Test
+    BuiltIn.Comment    Run Web server Scripts on destination vm listening to 80,81 and 82 ports
+    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET1_VM_IPS}[1]    ${WEBSERVER_80}    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET1_VM_IPS}[1]    ${WEBSERVER_81}    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET1_VM_IPS}[1]    ${WEBSERVER_82}    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+
+Start Vxlan Tool in SF
+    [Arguments]    ${network}    ${sf_vm_ip}    ${args}=${EMPTY}
+    [Documentation]    Starts the tool in the SF VM's
+    OpenStackOperations.Execute Command on VM Instance    ${network}    ${sf_vm_ip}    nohup python vxlan_tool.py ${args} &    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
 
-Delete Sub Networks In network_1
-    [Documentation]    Delete Sub Nets for the Networks with neutron request.
-    Delete SubNet    l2_subnet_1
+Stop Vxlan Tool in SF
+    [Arguments]    ${network}    ${sf_vm_ip}
+    [Documentation]    Starts the tool in the SF VM's
+    OpenStackOperations.Execute Command on VM Instance    ${network}    ${sf_vm_ip}    pkill python    user=${CLOUD_IMAGE_USER}    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
 
-Delete Networks
-    [Documentation]    Delete Networks with neutron request.
-    : FOR    ${NetworkElement}    IN    @{NETWORKS_NAME}
-    \    Delete Network    ${NetworkElement}
+Check Network Reachability
+    [Arguments]    ${net_name}    ${vm_ip}    ${command}    ${port}    ${ret_code}    ${cmd_timeout}=30s
+    ${nc_resp}    OpenStackOperations.Execute Command on VM Instance    ${net_name}    ${vm_ip}    ${command} @{NET1_VM_IPS}[1] ${port}    cmd_timeout=${cmd_timeout}    user=${CLOUD_IMAGE_USER}
+    ...    password=${CLOUD_IMAGE_PASS}    console=${CLOULD_IMAGE_CONSOLE}
+    BuiltIn.Should Contain    ${nc_resp}    ${ret_code}