Modification on SFC test Cases
[integration/test.git] / csit / libraries / OpenStackOperations.robot
index 974440e5510d618fcac04583ee1e3afd406dc6bc..ae6393a9c2f61e0c447c21c814b30177e8b38be3 100644 (file)
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation     Openstack library. This library is useful for tests to create network, subnet, router and vm instances
 Library           Collections
+Library           Process
 Library           OperatingSystem
 Library           RequestsLibrary
 Library           SSHLibrary
@@ -9,6 +10,7 @@ Resource          DataModels.robot
 Resource          DevstackUtils.robot
 Resource          KarafKeywords.robot
 Resource          L2GatewayOperations.robot
+Resource          ODLTools.robot
 Resource          OVSDB.robot
 Resource          SetupUtils.robot
 Resource          SSHKeywords.robot
@@ -17,7 +19,10 @@ Resource          Utils.robot
 Resource          ../variables/Variables.robot
 Resource          ../variables/netvirt/Variables.robot
 Variables         ../variables/netvirt/Modules.py
-Variables         ../variables/netvirt/Exceptions_Whitelist.py
+
+*** Variables ***
+@{VALIDATION_KEYWORDS}    Verify Services    Verify Expected Default Tunnels    Verify Expected Default Tables On Nodes
+${VALIDATION_FILE}    /tmp/validations.txt
 
 *** Keywords ***
 Get Tenant ID From Security Group
@@ -182,6 +187,14 @@ Get Port Id
     ${port_id} =    Collections.Get from List    ${splitted_output}    0
     [Return]    ${port_id}
 
+Get Sub Port Id
+    [Arguments]    ${portname}
+    [Documentation]    Retrieve the first 10 chars of the UUID for the given port name
+    ${port_id} =    OpenStackOperations.Get Port Id    ${portname}
+    ${output} =    String.Get Regexp Matches    ${port_id}    \\w{8}-\\w{2}
+    ${subport_id} =    Collections.Get from List    ${output}    0
+    [Return]    ${subport_id}
+
 Get Router Id
     [Arguments]    ${router1}
     [Documentation]    Retrieve the router id for the given router name
@@ -190,10 +203,39 @@ Get Router Id
     ${router_id} =    Collections.Get from List    ${splitted_output}    0
     [Return]    ${router_id}
 
+Add New Image From Url
+    [Arguments]    ${image_url}    ${image_name}
+    [Documentation]    To add new qcow2 images for testing.
+    ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    wget ${image_url} -O /tmp/new_image.qcow2
+    BuiltIn.Log    ${output}
+    BuiltIn.Should Be True    '${rc}' == '0'
+    ${output} =    OpenStack CLI    openstack image create ${image_name} --file /tmp/new_image.qcow2 --disk-format qcow2 --container-format bare --public
+
+Create Flavor
+    [Arguments]    ${flavor_name}    ${ram_in_mb}    ${disk_in_gb}    ${ncpu}=1
+    [Documentation]    To create new flavors for instance deployment and testing
+    ${output} =    OpenStack CLI    openstack flavor create ${flavor_name} --ram ${ram_in_mb} --disk ${disk_in_gb} --vcpus ${ncpu}
+
+Create Keypair
+    [Arguments]    ${keyname}    ${public_key_file}
+    [Documentation]    To add keypairs to Openstack that can be used when ssh to instances using publickey authentication
+    ${output} =    OpenStack CLI    openstack keypair create ${keyname} --public-key ${public_key_file}
+
+Generate And Add Keypair
+    [Arguments]    ${keyname}    ${keyfilename}
+    [Documentation]    To generate keypair using ssh-keygen and add them to Openstack
+    ${result} =    Process.Run Process    ssh-keygen -b 2048 -t rsa -f ${JENKINS_WORKSPACE}/${keyfilename} -q -N ""    shell=True
+    BuiltIn.Log    ${result.stdout}
+    BuiltIn.Log    ${result.stderr}
+    BuiltIn.Should Be True    '${result.rc}' == '0'
+    OpenStackOperations.Create Keypair    ${keyname}    ${JENKINS_WORKSPACE}/${keyfilename}.pub
+    OpenStackOperations.Get ControlNode Connection
+    SSHLibrary.Put_File    ${JENKINS_WORKSPACE}/${keyfilename}    /tmp
+
 Create Vm Instances
     [Arguments]    ${net_name}    ${vm_instance_names}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default    ${min}=1
-    ...    ${max}=1
     [Documentation]    Create X Vm Instance with the net id of the Netowrk.
+    ..    ${max}=1
     ${image}    BuiltIn.Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
     ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
     : FOR    ${vm}    IN    @{vm_instance_names}
@@ -210,23 +252,34 @@ Create Vm Instance With Port
     [Arguments]    ${port_name}    ${vm_instance_name}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
     [Documentation]    Create One VM instance using given ${port_name} and for given ${compute_node}
     ${image} =    BuiltIn.Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
-    ${port_id} =    OpenStackOperations.Get Port Id    ${port_name}
-    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-group ${sg}
+    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --port ${port_name} --security-group ${sg} ${vm_instance_name}
 
-Create Vm Instance With Ports
-    [Arguments]    ${port_name}    ${port2_name}    ${vm_instance_name}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
-    [Documentation]    Create One VM instance using given ${port_name} and for given ${compute_node}
+Create Vm Instance With Ports And Key On Compute Node
+    [Arguments]    ${port1_name}    ${port2_name}    ${vm_instance_name}    ${node_hostname}    ${image}=${EMPTY}    ${flavor}=m1.nano
+    ...    ${sg}=default    ${keyname}=${EMPTY}
+    [Documentation]    Create One VM instance using given ${port1_name} and ${port2_name} with keyname for ssh and also on a specific compute node
     ${image}    BuiltIn.Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
-    ${port_id} =    OpenStackOperations.Get Port Id    ${port_name}
-    ${port2_id} =    OpenStackOperations.Get Port Id    ${port2_name}
-    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} --nic port-id=${port2_id} ${vm_instance_name} --security-group ${sg}
+    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --port ${port1_name} --port ${port2_name} ${vm_instance_name} --security-group ${sg} --availability-zone nova:${node_hostname} --key-name ${keyname}
 
 Create Vm Instance With Port On Compute Node
     [Arguments]    ${port_name}    ${vm_instance_name}    ${node_hostname}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
-    [Documentation]    Create One VM instance using given ${port_name} and for given ${compute_node}
+    [Documentation]    Create One VM instance using given ${port_name} and for given ${node_hostname}
     ${image} =    BuiltIn.Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
-    ${port_id} =    OpenStackOperations.Get Port Id    ${port_name}
-    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} --security-group ${sg} --availability-zone nova:${node_hostname} ${vm_instance_name}
+    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --port ${port_name} --security-group ${sg} --availability-zone nova:${node_hostname} ${vm_instance_name}
+
+Remove Security Group From Vm Instance
+    [Arguments]    ${vm_instance_name}    ${security_group}
+    [Documentation]    Delete the Security Group from the VM Instance.
+    ${output} =    OpenStack CLI    openstack server remove security group ${vm_instance_name} ${security_group}
+
+Create Vm Instance With Ports On Compute Node
+    [Arguments]    ${port1_name}    ${port2_name}    ${vm_instance_name}    ${node_hostname}    ${image}=${EMPTY}    ${flavor}=m1.nano
+    ...    ${sg}=default
+    [Documentation]    Create One VM instance using given ${port1_name}, ${port2_name} and for given ${node_hostname} with no keys (cirros like)
+    ${image} =    BuiltIn.Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
+    ${port1_id} =    OpenStackOperations.Get Port Id    ${port1_name}
+    ${port2_id} =    OpenStackOperations.Get Port Id    ${port2_name}
+    ${output} =    OpenStack CLI    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port1_id} --nic port-id=${port2_id} --security-group ${sg} --availability-zone nova:${node_hostname} ${vm_instance_name}
 
 Get Hypervisor Hostname From IP
     [Arguments]    ${hypervisor_ip}
@@ -275,6 +328,29 @@ Get VM IP
     BuiltIn.Run Keyword If    '${fail_on_none}' == 'true'    BuiltIn.Should Not Contain    ${dhcp_ip}    None
     [Return]    ${vm_ip}    ${dhcp_ip}    ${vm_console_output}
 
+Verify If Instance Is Arpingable From DHCP Namespace
+    [Arguments]    ${net_name}    ${mac}    ${ip}
+    [Documentation]    Get the Port IP and check the arp -a from DHCP NS to ensure that the VM's have been assigned IP's
+    OpenStackOperations.Get ControlNode Connection
+    ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
+    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} arping ${ip} -c3    ${DEFAULT_LINUX_PROMPT_STRICT}    timeout=60s
+    ${mac_uppercase} =    String.Convert To Upper Case    ${mac}
+    BuiltIn.Should Contain    ${output}    [${mac_uppercase}]
+
+Check If Instance Is Ready For Ssh Login Using PublicKey
+    [Arguments]    ${net_name}    ${vm_ip}    ${user}=centos    ${idfile}=/tmp/odlkey    ${console}=cirros
+    [Documentation]    Ensure the VM is reachable from ssh as tests would require. This keyword will use publickey authentication
+    ${output} =    Execute Command on VM Instance with PublicKey Auth    ${net_name}    ${vm_ip}    ifconfig    user=${user}    idfile=${idfile}
+    ...    console=${console}
+    BuiltIn.Should Contain    ${output}    ${vm_ip}
+
+Check If Instance Is Ready For Ssh Login Using Password
+    [Arguments]    ${net_name}    ${vm_ip}    ${user}=cirros    ${password}=cubswin:)    ${console}=cirros
+    [Documentation]    Ensure the VM is reachable from ssh as tests would require. This keyword will use password authentication
+    ${output} =    Execute Command on VM Instance    ${net_name}    ${vm_ip}    ifconfig    ${user}    ${password}
+    ...    console=${console}
+    BuiltIn.Should Contain    ${output}    ${vm_ip}
+
 Get VM IPs
     [Arguments]    @{vms}
     [Documentation]    Get the instance IP addresses and nameserver address for the list of given vms.
@@ -378,16 +454,19 @@ Check If Console Is VmInstance
     BuiltIn.Should Contain    ${output}    ${console}
 
 Exit From Vm Console
+    [Arguments]    ${console}=cirros
     [Documentation]    Check if the session has been able to login to the VM instance and exit the instance
-    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    cirros
+    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    ${console}
     BuiltIn.Run Keyword If    ${rcode}    DevstackUtils.Write Commands Until Prompt    exit
 
 Check Ping
-    [Arguments]    ${ip_address}    ${ttl}=64
+    [Arguments]    ${ip_address}    ${ttl}=64    ${ping_tries}=3
     [Documentation]    Run Ping command on the IP available as argument
     ${ethertype} =    String.Get Regexp Matches    ${ip_address}    ${IP_REGEX}
-    ${output} =    BuiltIn.Run Keyword If    ${ethertype}    Utils.Write Commands Until Expected Prompt    ping -t ${ttl} -c 3 ${ip_address}    ${OS_SYSTEM_PROMPT}
-    ...    ELSE    Utils.Write Commands Until Expected Prompt    ping6 -t ${ttl} -c 3 ${ip_address}    ${OS_SYSTEM_PROMPT}
+    ${ping} =    BuiltIn.Set Variable If    ${ethertype}    ping    ping6
+    ${cmd} =    BuiltIn.Set Variable    rc=0; for count in `seq 1 ${ping_tries}`; do ${ping} -W1 -t${ttl} -c1 ${ip_address}; rc=$?; if [ $rc -eq 0 ]; then break; fi; done; echo ping_rc=$rc
+    ${output} =    Utils.Write Commands Until Expected Regexp    ${cmd}    ping_rc=\\d+    120
+    BuiltIn.Log    output: ${output}
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Check No Ping
@@ -402,26 +481,46 @@ Check Metadata Access
     BuiltIn.Should Contain    ${output}    200
 
 Execute Command on VM Instance
-    [Arguments]    ${net_name}    ${vm_ip}    ${cmd}    ${user}=cirros    ${password}=cubswin:)
+    [Arguments]    ${net_name}    ${vm_ip}    ${cmd}    ${user}=cirros    ${password}=cubswin:)    ${cmd_timeout}=30s
+    ...    ${console}=cirros
     [Documentation]    Login to the vm instance using ssh in the network, executes a command inside the VM and returns the ouput.
     OpenStackOperations.Get ControlNode Connection
     ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
-    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh ${user}@${vm_ip} -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null    password:
+    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh ${user}@${vm_ip} -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=password    password:
     ${output} =    Utils.Write Commands Until Expected Prompt    ${password}    ${OS_SYSTEM_PROMPT}
-    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance
+    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    ${console}
+    ${output} =    BuiltIn.Run Keyword If    ${rcode}    Utils.Write Commands Until Expected Prompt    ${cmd}    ${OS_SYSTEM_PROMPT}    timeout=${cmd_timeout}
+    [Teardown]    Exit From Vm Console    ${console}
+    [Return]    ${output}
+
+Execute Command on VM Instance With PublicKey Auth
+    [Arguments]    ${net_name}    ${vm_ip}    ${cmd}    ${user}=centos    ${idfile}=/tmp/odlkey    ${console}=cirros
+    [Documentation]    Login to the vm instance using ssh publickey in the network, executes a command inside the VM and returns the ouput.
+    OpenStackOperations.Get ControlNode Connection
+    ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
+    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh -i ${idfile} ${user}@${vm_ip} -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=publickey    prompt=${OS_SYSTEM_PROMPT}    timeout=60s
+    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    ${console}
     ${output} =    BuiltIn.Run Keyword If    ${rcode}    Utils.Write Commands Until Expected Prompt    ${cmd}    ${OS_SYSTEM_PROMPT}
-    [Teardown]    Exit From Vm Console
+    [Teardown]    Exit From Vm Console    ${console}
     [Return]    ${output}
 
+Copy File To VM Instance With PublicKey Auth
+    [Arguments]    ${net_name}    ${vm_ip}    ${file_to_copy}    ${user}=centos    ${idfile}=/tmp/odlkey
+    [Documentation]    Login to the vm instance using ssh publickey in the network, executes a command inside the VM and returns the ouput.
+    OpenStackOperations.Get ControlNode Connection
+    ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
+    ${rc} =    SSHLibrary.Execute Command    sudo ip netns exec qdhcp-${net_id} scp -i ${idfile} -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=publickey ${file_to_copy} ${user}@${vm_ip}:/tmp/    return_stdout=False    return_rc=True
+    BuiltIn.Should Be True    '${rc}' == '0'
+
 Test Operations From Vm Instance
     [Arguments]    ${net_name}    ${src_ip}    ${dest_ips}    ${user}=cirros    ${password}=cubswin:)    ${ttl}=64
-    ...    ${ping_should_succeed}=True    ${check_metadata}=True
+    ...    ${ping_should_succeed}=True    ${check_metadata}=True    ${console}=cirros    ${ping_tries}=3
     [Documentation]    Login to the vm instance using ssh in the network.
     OpenStackOperations.Get ControlNode Connection
     ${net_id} =    OpenStackOperations.Get Net Id    ${net_name}
-    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no ${user}@${src_ip} -o UserKnownHostsFile=/dev/null    password:
+    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ssh -o MACs=hmac-sha1 -o ConnectTimeout=5 -o StrictHostKeyChecking=no ${user}@${src_ip} -o UserKnownHostsFile=/dev/null    password:    10s
     ${output} =    Utils.Write Commands Until Expected Prompt    ${password}    ${OS_SYSTEM_PROMPT}
-    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance
+    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    ${console}
     BuiltIn.Run Keyword If    ${rcode}    Utils.Write Commands Until Expected Prompt    ifconfig    ${OS_SYSTEM_PROMPT}
     BuiltIn.Run Keyword If    ${rcode}    Utils.Write Commands Until Expected Prompt    route -n    ${OS_SYSTEM_PROMPT}
     BuiltIn.Run Keyword If    ${rcode}    Utils.Write Commands Until Expected Prompt    route -A inet6    ${OS_SYSTEM_PROMPT}
@@ -430,11 +529,11 @@ Test Operations From Vm Instance
     : FOR    ${dest_ip}    IN    @{dest_ips}
     \    ${string_empty} =    BuiltIn.Run Keyword And Return Status    Should Be Empty    ${dest_ip}
     \    BuiltIn.Run Keyword If    ${string_empty}    Continue For Loop
-    \    BuiltIn.Run Keyword If    ${rcode} and "${ping_should_succeed}" == "True"    OpenStackOperations.Check Ping    ${dest_ip}    ttl=${ttl}
+    \    BuiltIn.Run Keyword If    ${rcode} and "${ping_should_succeed}" == "True"    OpenStackOperations.Check Ping    ${dest_ip}    ttl=${ttl}    ping_tries=${ping_tries}
     \    ...    ELSE    OpenStackOperations.Check No Ping    ${dest_ip}    ttl=${ttl}
     ${ethertype} =    String.Get Regexp Matches    ${src_ip}    ${IP_REGEX}
     BuiltIn.Run Keyword If    ${rcode} and "${check_metadata}" and ${ethertype} == "True"    OpenStackOperations.Check Metadata Access
-    [Teardown]    Exit From Vm Console
+    [Teardown]    Exit From Vm Console    ${console}
 
 Test Netcat Operations From Vm Instance
     [Arguments]    ${net_name}    ${vm_ip}    ${dest_ip}    ${additional_args}=${EMPTY}    ${port}=12345    ${user}=cirros
@@ -454,9 +553,9 @@ Test Netcat Operations From Vm Instance
     BuiltIn.Should Match Regexp    ${nc_output}    ${server_data}
 
 Ping Other Instances
-    [Arguments]    ${list_of_external_dst_ips}
+    [Arguments]    ${list_of_external_dst_ips}    ${console}=cirros
     [Documentation]    Check reachability with other network's instances.
-    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance
+    ${rcode} =    BuiltIn.Run Keyword And Return Status    OpenStackOperations.Check If Console Is VmInstance    ${console}
     : FOR    ${dest_ip}    IN    @{list_of_external_dst_ips}
     \    OpenStackOperations.Check Ping    ${dest_ip}
 
@@ -481,8 +580,8 @@ Show Router Interface
     [Return]    ${output}
 
 Add Router Gateway
-    [Arguments]    ${router_name}    ${external_network_name}
-    ${output} =    OpenStack CLI    openstack router set ${router_name} --external-gateway ${external_network_name}
+    [Arguments]    ${router_name}    ${external_network_name}    ${additional_args}=${EMPTY}
+    ${output} =    OpenStack CLI    openstack router set ${router_name} --external-gateway ${external_network_name} ${additional_args}
 
 Remove Interface
     [Arguments]    ${router_name}    ${interface_name}
@@ -492,7 +591,7 @@ Remove Interface
 Remove Gateway
     [Arguments]    ${router_name}
     [Documentation]    Remove external gateway from the router.
-    BuiltIn.Log    openstack router unset ${router_name} --external-gateway
+    ${output} =    OpenStack CLI    openstack router unset ${router_name} --external-gateway
 
 Update Router
     [Arguments]    ${router_name}    ${cmd}
@@ -500,9 +599,10 @@ Update Router
     ${output} =    OpenStack CLI    openstack router set ${router_name} ${cmd}
 
 Show Router
-    [Arguments]    ${router_name}    ${options}
+    [Arguments]    ${router_name}    ${additional_args}=${EMPTY}
     [Documentation]    Show information of a given router. Router name and optional fields should be sent as arguments.
-    ${output} =    OpenStack CLI    openstack router show ${router_name}
+    ${output} =    OpenStack CLI    openstack router show ${router_name} ${additional_args}
+    [Return]    ${output}
 
 Delete Router
     [Arguments]    ${router_name}
@@ -525,10 +625,10 @@ Get DumpFlows And Ovsconfig
     \    Utils.Write Commands Until Expected Prompt    sudo ip netns exec ${line} ip route    ${DEFAULT_LINUX_PROMPT_STRICT}
     Utils.Write Commands Until Expected Prompt    sudo ovs-vsctl show    ${DEFAULT_LINUX_PROMPT_STRICT}
     Utils.Write Commands Until Expected Prompt    sudo ovs-vsctl list Open_vSwitch    ${DEFAULT_LINUX_PROMPT_STRICT}
-    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl show br-int -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
-    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-flows br-int -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
-    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-groups br-int -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
-    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-group-stats br-int -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
+    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl show ${INTEGRATION_BRIDGE} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
+    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
+    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-groups ${INTEGRATION_BRIDGE} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
+    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-group-stats ${INTEGRATION_BRIDGE} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
 
 Get ControlNode Connection
     SSHLibrary.Switch Connection    ${OS_CNTL_CONN_ID}
@@ -536,16 +636,20 @@ Get ControlNode Connection
 
 Get OvsDebugInfo
     [Documentation]    Get the OvsConfig and Flow entries from all Openstack nodes
-    BuiltIn.Run Keyword If    0 < ${NUM_OS_SYSTEM}    OpenStackOperations.Get DumpFlows And Ovsconfig    ${OS_CNTL_CONN_ID}
-    BuiltIn.Run Keyword If    1 < ${NUM_OS_SYSTEM}    OpenStackOperations.Get DumpFlows And Ovsconfig    ${OS_CMP1_CONN_ID}
-    BuiltIn.Run Keyword If    2 < ${NUM_OS_SYSTEM}    OpenStackOperations.Get DumpFlows And Ovsconfig    ${OS_CMP2_CONN_ID}
+    : FOR    ${conn_id}    IN    @{OS_ALL_CONN_IDS}
+    \    OpenStackOperations.Get DumpFlows And Ovsconfig    ${conn_id}
 
 Get Test Teardown Debugs
-    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}
+    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}    ${fail}=${FAIL_ON_EXCEPTIONS}
+    ODLTools.Get All    node_ip=${HA_PROXY_IP}    test_name=${test_name}
     OpenStackOperations.Get OvsDebugInfo
     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${HA_PROXY_IP}    ${netvirt_data_models}
-    KarafKeywords.Get Karaf Log Events From Test Start    ${test_name}
-    Run Keyword If    "${FAIL_ON_EXCEPTIONS}"=="True"    Fail If Exceptions Found During Test    ${test_name}    ${NETVIRT_EXCEPTIONS_WHITELIST}
+    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}    fail=${fail}
+    : FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
+    \    BuiltIn.Run Keyword And Ignore Error    Issue_Command_On_Karaf_Console    trace:transactions    ${ODL_SYSTEM_${i+1}_IP}
+
+Get Suite Debugs
+    Get Test Teardown Debugs    test_name=${SUITE_NAME}    fail=False
 
 Get Test Teardown Debugs For SFC
     [Arguments]    ${test_name}=${TEST_NAME}
@@ -636,41 +740,6 @@ Neutron Security Group Rule Create
     ${rule_id} =    BuiltIn.Should Match Regexp    ${output}    ${REGEX_UUID}
     [Return]    ${output}    ${rule_id}
 
-Neutron Security Group Rule Create Legacy Cli
-    [Arguments]    ${Security_group_name}    &{Kwargs}
-    [Documentation]    Creates neutron security rule with neutron request with or without optional params, here security group name is mandatory args, rule with optional params can be created by passing the optional args values ex: direction=${INGRESS_EGRESS}, Then these optional params are BuiltIn.Catenated with mandatory args, example of usage: "OpenStack Neutron Security Group Rule Create ${SGP_SSH} direction=${RULE_PARAMS[0]} ethertype=${RULE_PARAMS[1]} ..."
-    BuiltIn.Run Keyword If    ${Kwargs}    BuiltIn.Log    ${Kwargs}
-    ${description}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    description    default=${None}
-    ${direction}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    direction    default=${None}
-    ${ethertype}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    ethertype    default=${None}
-    ${port_range_max}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    port_range_max    default=${None}
-    ${port_range_min}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    port_range_min    default=${None}
-    ${protocol}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    protocol    default=${None}
-    ${remote_group_id}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    remote_group_id    default=${None}
-    ${remote_ip_prefix}    BuiltIn.Run Keyword If    ${Kwargs}    Collections.Pop From Dictionary    ${Kwargs}    remote_ip_prefix    default=${None}
-    ${cmd} =    BuiltIn.Set Variable    neutron security-group-rule-create ${Security_group_name}
-    ${cmd} =    BuiltIn.Run Keyword If    '${description}'!='None'    BuiltIn.Catenate    ${cmd}    --description ${description}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${direction}'!='None'    BuiltIn.Catenate    ${cmd}    --direction ${direction}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${ethertype}'!='None'    BuiltIn.Catenate    ${cmd}    --ethertype ${ethertype}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${port_range_max}'!='None'    BuiltIn.Catenate    ${cmd}    --port_range_max ${port_range_max}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${port_range_min}'!='None'    BuiltIn.Catenate    ${cmd}    --port_range_min ${port_range_min}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${protocol}'!='None'    BuiltIn.Catenate    ${cmd}    --protocol ${protocol}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${remote_group_id}'!='None'    BuiltIn.Catenate    ${cmd}    --remote_group_id ${remote_group_id}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${cmd} =    BuiltIn.Run Keyword If    '${remote_ip_prefix}'!='None'    BuiltIn.Catenate    ${cmd}    --remote_ip_prefix ${remote_ip_prefix}
-    ...    ELSE    BuiltIn.Catenate    ${cmd}
-    ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
-    ${rule_id} =    BuiltIn.Should Match Regexp    ${output}    ${REGEX_UUID}
-    BuiltIn.Log    ${rule_id}
-    BuiltIn.Should Be True    '${rc}' == '0'
-    [Return]    ${output}    ${rule_id}
-
 Security Group Create Without Default Security Rules
     [Arguments]    ${sg_name}    ${additional_args}=${EMPTY}
     [Documentation]    Create Neutron Security Group with no default rules, using specified name and optional arguments.
@@ -686,7 +755,7 @@ Delete All Security Group Rules
     \    ${output} =    OpenStack CLI    openstack security group rule delete ${rule}
 
 Create Allow All SecurityGroup
-    [Arguments]    ${sg_name}    ${ether_type}=IPv4
+    [Arguments]    ${sg_name}    ${ether_type}=IPv4    ${dual}=False
     [Documentation]    Allow all TCP/UDP/ICMP packets for this suite
     OpenStackOperations.Neutron Security Group Create    ${sg_name}
     OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=ingress    ethertype=${ether_type}    port_range_max=65535    port_range_min=1    protocol=tcp
@@ -695,6 +764,16 @@ Create Allow All SecurityGroup
     OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=egress    ethertype=${ether_type}    protocol=icmp
     OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=ingress    ethertype=${ether_type}    port_range_max=65535    port_range_min=1    protocol=udp
     OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=egress    ethertype=${ether_type}    port_range_max=65535    port_range_min=1    protocol=udp
+    BuiltIn.Run Keyword If    "${dual}"=="True"    Run Keywords    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=ingress    ethertype=IPv6
+    ...    port_range_max=65535    port_range_min=1    protocol=tcp
+    ...    AND    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=egress    ethertype=IPv6    port_range_max=65535
+    ...    port_range_min=1    protocol=tcp
+    ...    AND    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=ingress    ethertype=IPv6    protocol=icmp
+    ...    AND    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=egress    ethertype=IPv6    protocol=icmp
+    ...    AND    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=ingress    ethertype=IPv6    port_range_max=65535
+    ...    port_range_min=1    protocol=udp
+    ...    AND    OpenStackOperations.Neutron Security Group Rule Create    ${sg_name}    direction=egress    ethertype=IPv6    port_range_max=65535
+    ...    port_range_min=1    protocol=udp
 
 Create Neutron Port With Additional Params
     [Arguments]    ${network_name}    ${port_name}    ${additional_args}=${EMPTY}
@@ -730,6 +809,14 @@ Get Port Mac
     ${port_mac} =    Collections.Get from List    ${splitted_output}    0
     [Return]    ${port_mac}
 
+Get Port Mac Address From Ip
+    [Arguments]    ${ip}
+    [Documentation]    Retrieve the mac address for a port that matches any given ip.
+    ${output} =    OpenStack CLI    openstack port list | grep -w ${ip} | awk '{print $5}'
+    ${splitted_output} =    String.Split String    ${output}    ${EMPTY}
+    ${mac_addr} =    Collections.Get from List    ${splitted_output}    0
+    [Return]    ${mac_addr}
+
 Create L2Gateway
     [Arguments]    ${bridge_name}    ${intf_name}    ${gw_name}
     [Documentation]    Keyword to create an L2 Gateway ${gw_name} for bridge ${bridge_name} connected to interface ${intf_name} (Using Neutron CLI).
@@ -817,6 +904,14 @@ Update Port Rest
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
     [Return]    ${resp.content}
 
+Get Neutron Network Rest
+    [Arguments]    ${net_id}
+    [Documentation]    Keyword to get the specific network details in Neutron (Using REST).
+    ${resp} =    RequestsLibrary.Get Request    session    ${NETWORK_URL}/network/${net_id}
+    BuiltIn.Log    ${resp.content}
+    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    [Return]    ${resp.content}
+
 Create And Configure Security Group
     [Arguments]    ${sg-name}
     [Documentation]    Create Security Group with given name, and default allow rules for TCP/UDP/ICMP protocols.
@@ -840,23 +935,21 @@ Remove Security Group From VM
     ${output} =    OpenStack CLI    openstack server remove security group ${vm} ${sg}
 
 Create SFC Flow Classifier
-    [Arguments]    ${name}    ${src_ip}    ${dest_ip}    ${protocol}    ${dest_port}    ${neutron_src_port}
+    [Arguments]    ${name}    ${src_ip}    ${dest_ip}    ${protocol}    ${neutron_src_port}    ${args}=${EMPTY}
     [Documentation]    Create a flow classifier for SFC
-    ${output} =    OpenStack CLI    openstack sfc flow classifier create --ethertype IPv4 --source-ip-prefix ${src_ip}/32 --destination-ip-prefix ${dest_ip}/32 --protocol ${protocol} --destination-port ${dest_port}:${dest_port} --logical-source-port ${neutron_src_port} ${name}
+    ${output} =    OpenStack CLI    openstack sfc flow classifier create --ethertype IPv4 --source-ip-prefix ${src_ip}/32 --destination-ip-prefix ${dest_ip}/32 --protocol ${protocol} --logical-source-port ${neutron_src_port} ${args} ${name}
     BuiltIn.Should Contain    ${output}    ${name}
     [Return]    ${output}
 
 Delete SFC Flow Classifier
     [Arguments]    ${name}
     [Documentation]    Delete a SFC flow classifier
-    OpenStackOperations.Get ControlNode Connection
     ${output} =    OpenStack CLI    openstack sfc flow classifier delete ${name}
     [Return]    ${output}
 
 Create SFC Port Pair
     [Arguments]    ${name}    ${port_in}    ${port_out}
     [Documentation]    Creates a neutron port pair for SFC
-    OpenStackOperations.Get ControlNode Connection
     ${output} =    OpenStack CLI    openstack sfc port pair create --ingress=${port_in} --egress=${port_out} ${name}
     BuiltIn.Should Contain    ${output}    ${name}
     [Return]    ${output}
@@ -889,12 +982,24 @@ Delete SFC Port Pair Group
     [Return]    ${output}
 
 Create SFC Port Chain
-    [Arguments]    ${name}    ${pg1}    ${pg2}    ${fc}
+    [Arguments]    ${name}    ${args}=${EMPTY}
     [Documentation]    Creates a port pair chain with two port groups and a singel classifier.
-    ${output} =    OpenStack CLI    openstack sfc port chain create --port-pair-group ${pg1} --port-pair-group ${pg2} --flow-classifier ${fc} ${name}
+    ${output} =    OpenStack CLI    openstack sfc port chain create ${name} ${args}
     BuiltIn.Should Contain    ${output}    ${name}
     [Return]    ${output}
 
+Update SFC Port Chain With A New Flow Classifier
+    [Arguments]    ${name}    ${fc}
+    [Documentation]    Adds a Flow Classifier to a Port Chain
+    ${output} =    OpenStack CLI    openstack sfc port chain set ${name} --flow-classifier ${fc}
+    [Return]    ${output}
+
+Update SFC Port Chain Removing A Flow Classifier
+    [Arguments]    ${name}    ${fc}
+    [Documentation]    Adds a Flow Classifier to a Port Chain
+    ${output} =    OpenStack CLI    openstack sfc port chain unset ${name} --flow-classifier ${fc}
+    [Return]    ${output}
+
 Delete SFC Port Chain
     [Arguments]    ${name}
     [Documentation]    Delete a SFC port chain
@@ -943,8 +1048,7 @@ Neutron Cleanup
 OpenStack List All
     [Documentation]    Get a list of different OpenStack resources that might be in use.
     @{modules} =    BuiltIn.Create List    server    port    network    subnet    security group
-    ...    security group rule
-    BuiltIn.Run Keyword If    "${ODL_ENABLE_L3_FWD}"=="yes"    Collections.Append To List    ${modules}    floating ip    router
+    ...    security group rule    floating ip    router
     : FOR    ${module}    IN    @{modules}
     \    ${output} =    OpenStack CLI    openstack ${module} list
 
@@ -960,30 +1064,30 @@ OpenStack CLI Get List
 OpenStack CLI
     [Arguments]    ${cmd}
     [Documentation]    Run the given OpenStack ${cmd} and log the output.
-    ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
-    BuiltIn.Log    ${output}
-    BuiltIn.Should Be True    '${rc}' == '0'
-    [Return]    ${output}
+    ${result} =    Process.Run Process    ${cmd}    shell=True
+    BuiltIn.Log    ${result.stdout}
+    BuiltIn.Log    ${result.stderr}
+    BuiltIn.Should Be True    '${result.rc}' == '0'
+    [Return]    ${result.stdout}
 
 OpenStack CLI With No Log
     [Arguments]    ${cmd}
     [Documentation]    Run the given OpenStack ${cmd} and do not log the output.
-    ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
-    BuiltIn.Should Be True    '${rc}' == '0'
-    [Return]    ${output}
+    ${result} =    Process.Run Process    ${cmd}    shell=True
+    BuiltIn.Should Be True    '${result.rc}' == '0'
+    [Return]    ${result.stdout}
 
 OpenStack Cleanup All
     [Documentation]    Cleanup all Openstack resources with best effort. The keyword will query for all resources
     ...    in use and then attempt to delete them. Errors are ignored to allow the cleanup to continue.
-    @{fips} =    BuiltIn.Run Keyword If    "${ODL_ENABLE_L3_FWD}"=="yes"    OpenStack CLI Get List    openstack floating ip list -f json
-    ...    ELSE    BuiltIn.Create List    @{EMPTY}
+    @{fips} =    OpenStack CLI Get List    openstack floating ip list -f json
     : FOR    ${fip}    IN    @{fips}
     \    BuiltIn.Run Keyword And Ignore Error    Delete Floating IP    ${fip['ID']}
     @{vms} =    OpenStack CLI Get List    openstack server list -f json
     : FOR    ${vm}    IN    @{vms}
+    \    OpenStack CLI    openstack server show ${vm['ID']}
     \    BuiltIn.Run Keyword And Ignore Error    Delete Vm Instance    ${vm['ID']}
-    @{routers} =    BuiltIn.Run Keyword If    "${ODL_ENABLE_L3_FWD}"=="yes"    OpenStack CLI Get List    openstack router list -f json
-    ...    ELSE    BuiltIn.Create List    @{EMPTY}
+    @{routers} =    OpenStack CLI Get List    openstack router list -f json
     : FOR    ${router}    IN    @{routers}
     \    BuiltIn.Run Keyword And Ignore Error    Cleanup Router    ${router['ID']}
     @{ports} =    OpenStack CLI Get List    openstack port list -f json
@@ -1011,25 +1115,46 @@ Cleanup Router
 OpenStack Suite Setup
     [Documentation]    Wrapper teardown keyword that can be used in any suite running in an openstack environement
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
-    @{loggers} =    BuiltIn.Create List    org.apache.karaf.shell.support.ShellUtil
+    @{loggers} =    BuiltIn.Create List    org.apache.karaf.shell.support.ShellUtil    org.apache.sshd.server.session.ServerSessionImpl
     Setuputils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    OFF    ${loggers}
     DevstackUtils.Devstack Suite Setup
     @{tcpdump_port_6653_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes    tcpdump_port_6653    port 6653    @{OS_ALL_IPS}
     BuiltIn.Set Suite Variable    @{tcpdump_port_6653_conn_ids}
     BuiltIn.Run Keyword If    "${PRE_CLEAN_OPENSTACK_ALL}"=="True"    OpenStack Cleanup All
     OpenStackOperations.Add OVS Logging On All OpenStack Nodes
+    Validate Deployment
 
 OpenStack Suite Teardown
     [Documentation]    Wrapper teardown keyword that can be used in any suite running in an openstack environement
     ...    to clean up all openstack resources. For example, all instances, networks, ports, etc will be listed and
     ...    and deleted. As other global cleanup tasks are needed, they can be added here and the suites will all
     ...    benefit automatically.
+    # TODO: followup patch will add the list of vms to pass to Show Debugs
+    # OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}
+    OpenStackOperations.Get Suite Debugs
     OpenStack Cleanup All
     OpenStackOperations.Stop Packet Capture On Nodes    ${tcpdump_port_6653_conn_ids}
     SSHLibrary.Close All Connections
     : FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
     \    KarafKeywords.Issue Command On Karaf Console    threads --list | wc -l    ${ODL_SYSTEM_${i+1}_IP}
 
+Validate Deployment
+    [Documentation]    Validate the deployment. Examples to validate are verifying default table
+    ...    flows are installed and that the tunnel mesh has been built correctly.
+    Write To Validate File    ----------------------------------------\n${SUITE_NAME}\n
+    : FOR    ${keyword}    IN    @{VALIDATION_KEYWORDS}
+    \    ${status} =    Builtin.Run Keyword And Return Status    ${keyword}
+    \    BuiltIn.Run Keyword If    "${status}" == "FAIL" or "${status}" == "False"    BuiltIn.Run Keywords    Write To Validate File    Failed: ${keyword}
+    \    ...    AND    BuiltIn.Fail
+    \    ...    ELSE    Write To Validate File    Passed: ${keyword}
+
+Write To Validate File
+    [Arguments]    ${msg}
+    [Documentation]    Write the given ${msg} to ${VALIDATION_FILE}. Create the file if not present.
+    ${status} =    BuiltIn.Run Keyword And Return Status    OperatingSystem.File Should Exist    ${VALIDATION_FILE}
+    BuiltIn.Run Keyword If    "${status}" == "False"    OperatingSystem.Create File    ${VALIDATION_FILE}
+    OperatingSystem.Append To File    ${VALIDATION_FILE}    ${msg}\n
+
 Copy DHCP Files From Control Node
     [Documentation]    Copy the current DHCP files to the robot vm. The keyword must be called
     ...    after the subnet(s) are created and before the subnet(s) are deleted.
@@ -1048,15 +1173,13 @@ Is Feature Installed
 
 Add OVS Logging On All OpenStack Nodes
     [Documentation]    Add higher levels of OVS logging to all the OpenStack nodes
-    BuiltIn.Run Keyword If    0 < ${NUM_OS_SYSTEM}    OVSDB.Add OVS Logging    ${OS_CNTL_CONN_ID}
-    BuiltIn.Run Keyword If    1 < ${NUM_OS_SYSTEM}    OVSDB.Add OVS Logging    ${OS_CMP1_CONN_ID}
-    BuiltIn.Run Keyword If    2 < ${NUM_OS_SYSTEM}    OVSDB.Add OVS Logging    ${OS_CMP2_CONN_ID}
+    : FOR    ${conn_id}    IN    @{OS_ALL_CONN_IDS}
+    \    OVSDB.Add OVS Logging    ${conn_id}
 
 Reset OVS Logging On All OpenStack Nodes
     [Documentation]    Reset the OVS logging to all the OpenStack nodes
-    BuiltIn.Run Keyword If    0 < ${NUM_OS_SYSTEM}    OVSDB.Reset OVS Logging    ${OS_CNTL_CONN_ID}
-    BuiltIn.Run Keyword If    1 < ${NUM_OS_SYSTEM}    OVSDB.Reset OVS Logging    ${OS_CMP1_CONN_ID}
-    BuiltIn.Run Keyword If    2 < ${NUM_OS_SYSTEM}    OVSDB.Reset OVS Logging    ${OS_CMP2_CONN_ID}
+    : FOR    ${conn_id}    IN    @{OS_ALL_CONN_IDS}
+    \    OVSDB.Reset OVS Logging    ${conn_id}
 
 Start Packet Capture On Nodes
     [Arguments]    ${tag}    ${filter}    @{ips}
@@ -1071,3 +1194,96 @@ Start Packet Capture On Nodes
 Stop Packet Capture On Nodes
     [Arguments]    ${conn_ids}=@{EMPTY}
     Tcpdump.Stop Packet Capture on Nodes    ${conn_ids}
+
+Server Live Migrate
+    [Arguments]    ${vm_instance_name}
+    [Documentation]    Keyword for live migration of VM instance
+    ...    additional_agrs is to select particular migration(live/shared-migration/block-migration)
+    ...    if the additional_agrs is not given default migration(shared-migration) will happen
+    ${output} =    OpenStackOperations.OpenStack CLI    nova live-migration ${vm_instance_name}
+
+Get Hypervisor Host Of Vm
+    [Arguments]    ${vm_name}
+    [Documentation]    Show server with neutron request.
+    ${output} =    OpenStackOperations.OpenStack CLI    openstack server show -f value -c OS-EXT-SRV-ATTR:host ${vm_name}
+    [Return]    ${output}
+
+Check If Migration Is Complete
+    [Arguments]    ${vm_name}
+    [Documentation]    Show server and verify if task_state is not migrating
+    ${output} =    OpenStackOperations.OpenStack CLI    openstack server show ${vm_name} | grep "OS-EXT-STS:task_state"
+    BuiltIn.Should Not Contain    ${output}    migrating
+
+Modify OpenStack Configuration File
+    [Arguments]    ${conn_id}    ${file_name}    ${section}    ${key}    ${value}
+    [Documentation]    Use crudini to modify any parameter in any Openstack configuration File
+    SSHLibrary.Switch Connection    ${conn_id}
+    ${output}    ${rc} =    SSHLibrary.Execute Command    sudo crudini --verbose --set --inplace ${file_name} ${section} ${key} ${value}    return_rc=True    return_stdout=True
+    BuiltIn.Log    ${output}
+    BuiltIn.Should Be True    '${rc}' == '0'
+
+Restart DevStack Service
+    [Arguments]    ${conn_id}    ${service_name}
+    [Documentation]    Restart the Openstack Service
+    SSHLibrary.Switch Connection    ${conn_id}
+    ${output}    ${rc} =    SSHLibrary.Execute Command    sudo systemctl restart devstack@${service_name}.service    return_rc=True    return_stdout=True
+    BuiltIn.Log    ${output}
+    BuiltIn.Should Be True    '${rc}' == '0'
+
+Get Network Segmentation Id
+    [Arguments]    ${network_name}
+    [Documentation]    Returns network segmentation id for the given network name.
+    ${output} =    OpenStack CLI    openstack network show ${network_name} | grep segmentation_id | awk '{print $4}'
+    @{list} =    String.Split String    ${output}
+    [Return]    @{list}[0]
+
+Verify Services
+    [Documentation]    Verify if the services are operational
+    Wait Until Keyword Succeeds    60    2    ClusterManagement.Check Status Of Services Is OPERATIONAL    @{NETVIRT_DIAG_SERVICES}
+
+Verify Expected Default Tunnels
+    [Documentation]    Verify if the default tunnels are created.
+    ...    SFC jobs currently fail this validation because it uses of-tunnels.
+    ...    This validation will be blocked for NEtvirt SFC jobs until support for of-tunnels
+    ...    added to odltools.
+    ${check_feature_list} =    BuiltIn.Create List    odl-netvirt-sfc
+    ${is_sfc_enabled} =    OpenStackOperations.Is Feature Installed    features=${check_feature_list}
+    BuiltIn.Return From Keyword If    ${is_sfc_enabled} == ${True}    ${True}
+    BuiltIn.Return From Keyword If    ${OS_NODE_CNT} == ${1}    ${True}
+    ${output} =    ODLTools.Analyze Tunnels    test_name=${SUITE_NAME}.Suite Setup
+    BuiltIn.Should Contain    ${output}    All tunnels are up
+
+Verify Expected Default Tables On Nodes
+    [Arguments]    ${node_ips}=@{OS_ALL_IPS}
+    [Documentation]    Verify if Default Table Entries are programmed on all Nodes
+    ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}
+    Utils.Log Content    ${resp.content}
+    ${failed_node_list} =    BuiltIn.Create List
+    : FOR    ${node_ip}    IN    @{node_ips}
+    \    ${failed_table_list} =    Verify Expected Default Tables    ${node_ip}
+    \    ${failed_table_list_size} =    BuiltIn.Get Length    ${failed_table_list}
+    \    BuiltIn.Run Keyword If    ${failed_table_list_size} > 0    Collections.Append To List    ${failed_node_list}    ${node_ip}
+    Builtin.Should Be Empty    ${failed_node_list}
+
+Verify Expected Default Tables
+    [Arguments]    ${ovs_ip}
+    [Documentation]    Verify if Default Table Entries are programmed on specific Node
+    ${flow_dump} =    Utils.Run Command On Remote System    ${ovs_ip}    sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenFlow13
+    BuiltIn.Log    ${flow_dump}
+    ${failed_table_list} =    BuiltIn.Create List
+    : FOR    ${table}    IN    @{DEFAULT_FLOW_TABLES}
+    \    ${rc} =    Builtin.Run Keyword And Return Status    Builtin.Should Not Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+    \    BuiltIn.Run Keyword If    ${rc}    Collections.Append To List    ${failed_table_list}    ${table}
+    [Return]    ${failed_table_list}
+
+Get Project Id
+    [Arguments]    ${project_name}
+    [Documentation]    Returns project ID for the given project name.
+    ${project_id} =    OpenStack CLI    openstack project show ${project_name} -f value -c id
+    [Return]    ${project_id}
+
+Set Instance Quota For Project
+    [Arguments]    ${num_instances}    ${project_id}
+    [Documentation]    Set quota for the created instances using the specific project id.
+    ${output} =    OpenStack CLI    openstack quota set --instances ${num_instances} ${project_id}
+    [Return]    ${output}