adding model dump in new netvirt specific robot library 46/48646/9
authorJamo Luhrsen <jluhrsen@redhat.com>
Thu, 24 Nov 2016 00:15:02 +0000 (16:15 -0800)
committerVenkatrangan Govindarajan <venkatrangang@hcl.com>
Wed, 30 Nov 2016 00:08:44 +0000 (00:08 +0000)
Change-Id: I3b2ceda888bebb01dd651e1057b1aebfeea4c0b2
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/Netvirt.robot [new file with mode: 0644]
csit/suites/openstack/connectivity/01_l2_tests.robot
csit/suites/openstack/connectivity/02_l3_tests.robot
csit/suites/openstack/connectivity/03_external_network_tests.robot

diff --git a/csit/libraries/Netvirt.robot b/csit/libraries/Netvirt.robot
new file mode 100644 (file)
index 0000000..b520a0e
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Library           RequestsLibrary
+
+*** Variables ***
+@{data_models}    config/ietf-interfaces:interfaces    config/itm-state:dpn-endpoints    config/itm-state:tunnel-list    config/itm:transport-zones    config/neutron:neutron    config/neutronvpn:networkMaps    config/neutronvpn:router-interfaces-map
+...               config/neutronvpn:subnetmaps    config/neutronvpn:vpnMaps    config/odl-fib:fibEntries    config/odl-l3vpn:router-interfaces    config/odl-l3vpn:vpn-id-to-vpn-instance    config/odl-l3vpn:vpn-instance-to-vpn-id    config/odl-nat:ext-routers
+...               config/odl-nat:external-networks    config/odl-nat:floating-ip-info    config/odl-nat:napt-switches    operational/ietf-interfaces:interfaces-state    operational/itm-state:tunnels_state    operational/neutronvpn:neutron-vpn-portip-port-data    operational/neutronvpn:subnetmaps
+...               operational/odl-l3vpn:neutron-router-dpns    operational/odl-l3vpn:vpn-instance-op-data    operational/odl-nat:floating-ip-info
+
+*** Keywords ***
+Get Model Dump
+    [Arguments]    ${controller_ip}
+    [Documentation]    Will output a list of mdsal models using ${data_models} list
+    Create Session    model_dump_session    http://${controller_ip}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+    : FOR    ${model}    IN    @{data_models}
+    \    ${resp}=    RequestsLibrary.Get Request    model_dump_session    restconf/${model}
+    \    Log    ${resp.status_code}
+    \    ${pretty_output}=    To Json    ${resp.content}    pretty_print=True
+    \    Log    ${pretty_output}
index 68e44c5a2007c49efdedf4ec426bb2ada5f14aaa..1502774ddca49c7943e7d5f399bd4fffb28871b3 100644 (file)
@@ -4,14 +4,16 @@ Suite Setup       BuiltIn.Run Keywords    SetupUtils.Setup_Utils_For_Setup_And_T
 ...               AND    DevstackUtils.Devstack Suite Setup
 Suite Teardown    Close All Connections
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     Get OvsDebugInfo
+Test Teardown     Run Keywords    Get OvsDebugInfo
+...               AND    Get Model Dump    ${ODL_SYSTEM_IP}
 Library           SSHLibrary
 Library           OperatingSystem
 Library           RequestsLibrary
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/Netvirt.robot
+Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/SetupUtils.robot
+Resource          ../../../libraries/Utils.robot
 
 *** Variables ***
 @{NETWORKS_NAME}    l2_network_1    l2_network_2
@@ -68,6 +70,7 @@ Check Vm Instances Have Ip Address
     Set Suite Variable    ${NET2_VM_IPS}
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Ping Vm Instance1 In l2_network_1
     [Documentation]    Check reachability of vm instances by pinging to them.
@@ -136,6 +139,7 @@ Delete Vm Instances In l2_network_2
     \    Delete Vm Instance    ${VmElement}
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Delete Sub Networks In l2_network_1
     [Documentation]    Delete Sub Nets for the Networks with neutron request.
index 9ba71d1f6b9dae0f6c4486cbf43ed7592225cbd6..43d74502fc58af6fd19da026dcc2c9f26d6b58bc 100644 (file)
@@ -4,14 +4,16 @@ Suite Setup       BuiltIn.Run Keywords    SetupUtils.Setup_Utils_For_Setup_And_T
 ...               AND    DevstackUtils.Devstack Suite Setup
 Suite Teardown    Close All Connections
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     Get OvsDebugInfo
+Test Teardown     Run Keywords    Get OvsDebugInfo
+...               AND    Get Model Dump    ${ODL_SYSTEM_IP}
 Library           SSHLibrary
 Library           OperatingSystem
 Library           RequestsLibrary
-Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/Netvirt.robot
 Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/Utils.robot
 
 *** Variables ***
 @{NETWORKS_NAME}    network_1    network_2
@@ -58,6 +60,7 @@ Check Vm Instances Have Ip Address
     Set Suite Variable    ${NET2_DHCP_IP}
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Create Routers
     [Documentation]    Create Router
@@ -139,6 +142,7 @@ Delete Vm Instances In network_2
     \    Delete Vm Instance    ${VmElement}
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Delete Router Interfaces
     [Documentation]    Remove Interface to the subnets.
index 6897f6f310be5d1a2ea6170c491af27f79e0d867..a50aee9ebdf37da910f75e0359152ceeac8251c7 100644 (file)
@@ -2,13 +2,15 @@
 Documentation     Test suite to check North-South connectivity in L3 using a router and an external network
 Suite Setup       Devstack Suite Setup    source_pwd=yes
 Suite Teardown    Close All Connections
-Test Teardown     Get OvsDebugInfo
+Test Teardown     Run Keywords    Get OvsDebugInfo
+...               AND    Get Model Dump    ${ODL_SYSTEM_IP}
 Library           SSHLibrary
 Library           OperatingSystem
 Library           RequestsLibrary
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/Netvirt.robot
+Resource          ../../../libraries/OpenStackOperations.robot
+Resource          ../../../libraries/Utils.robot
 
 *** Variables ***
 @{NETWORKS_NAME}    l3_net
@@ -73,6 +75,7 @@ Check Vm Instances Have Ip Address
     Wait Until Keyword Succeeds    180s    10s    Verify VMs Received DHCP Lease    @{VM_INSTANCES}
     [Teardown]    Run Keywords    Show Debugs    ${VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Create And Associate Floating IPs for VMs
     [Documentation]    Create and associate a floating IP for the VM
@@ -80,6 +83,7 @@ Create And Associate Floating IPs for VMs
     Set Suite Variable    ${VM_FLOATING_IPS}
     [Teardown]    Run Keywords    Show Debugs    ${VM_INSTANCES}
     ...    AND    Get OvsDebugInfo
+    ...    AND    Get Model Dump    ${ODL_SYSTEM_IP}
 
 Ping External Gateway From Control Node
     [Documentation]    Check reachability of external gateway by pinging it from the control node.