From a84b95837276cee3df5ebb112a0273bcf911d259 Mon Sep 17 00:00:00 2001 From: Jozef Behran Date: Wed, 27 Apr 2016 14:43:55 +0200 Subject: [PATCH 1/1] Tidied new and updated suites Change-Id: I08a2702e5455ab85d744c1c540f51c0820df56af Signed-off-by: Jozef Behran --- csit/libraries/DevstackUtils.robot | 10 ++-- csit/libraries/OpenStackOperations.robot | 52 +++++++++---------- csit/libraries/Utils.robot | 5 +- csit/libraries/VtnCoKeywords.robot | 2 +- csit/libraries/VtnMaKeywords.robot | 2 +- .../buycar_failover.robot | 4 +- .../openstack/connectivity/01_l2_tests.robot | 6 +-- .../openstack/connectivity/02_l3_tests.robot | 14 ++--- ..._additional_flows_verification_tests.robot | 14 ++--- 9 files changed, 54 insertions(+), 55 deletions(-) diff --git a/csit/libraries/DevstackUtils.robot b/csit/libraries/DevstackUtils.robot index 8b495c7d9e..bba6fab552 100644 --- a/csit/libraries/DevstackUtils.robot +++ b/csit/libraries/DevstackUtils.robot @@ -24,7 +24,7 @@ ${CLEAN_DEVSTACK_HOST} False *** Keywords *** Run Tempest Tests [Arguments] ${tempest_regex} ${timeout}=600s - [Documentation] Execute the tempest tests + [Documentation] Execute the tempest tests Write Commands Until Prompt cd /opt/stack/new/tempest Write Commands Until Prompt sudo rm -rf /opt/stack/new/tempest/.testrepository Write Commands Until Prompt sudo testr init @@ -34,13 +34,13 @@ Run Tempest Tests # TODO: also need to verify some non-zero pass count as well as other results are ok (e.g. skipped, etc) Devstack Suite Setup Tests - [Documentation] Login to the Openstack Control Node to run tempest suite + [Documentation] Login to the Openstack Control Node to run tempest suite SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT} Utils.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD} SSHLibrary.Set Client Configuration timeout=${default_devstack_prompt_timeout} Devstack Suite Setup - [Documentation] Login to the Openstack Control Node to run tempest suite + [Documentation] Login to the Openstack Control Node to run tempest suite SSHLibrary.Open Connection ${DEVSTACK_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} Utils.Flexible SSH Login ${DEVSTACK_SYSTEM_USER} ${DEVSTACK_SYSTEM_PASSWORD} SSHLibrary.Set Client Configuration timeout=${default_devstack_prompt_timeout} @@ -104,8 +104,8 @@ Write Commands Until Prompt [Return] ${output} Get Networking ODL Version Of Release - [Documentation] Get version of ODL to be installed [Arguments] ${version} + [Documentation] Get version of ODL to be installed # once Beryllium SR1 goes out, we can change beryllium-latest to use 0.4.2 Return From Keyword If "${version}" == "beryllium-latest" beryllium-snapshot-0.4.2 Return From Keyword If "${version}" == "beryllium-SR1" beryllium-snapshot-0.4.1 @@ -120,7 +120,7 @@ Get Networking ODL Version Of Release Return From Keyword If "${version}" == "helium" helium Show Devstack Debugs - [Documentation] Collect the devstack logs to debug in case of failure + [Documentation] Collect the devstack logs to debug in case of failure Write Commands Until Prompt gunzip /opt/stack/logs/devstacklog.txt.gz Write Commands Until Prompt tail -n2000 /opt/stack/logs/devstacklog.txt timeout=600s Write Commands Until Prompt grep 'distribution-karaf.*zip' /opt/stack/logs/devstacklog.txt diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index fdc0dc1bae..966d7dd0c4 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -6,7 +6,7 @@ Variables ../variables/Variables.py *** Keywords *** Create Network - [Arguments] ${network_name} ${devstack_path}=/opt/stack/new/devstack + [Arguments] ${network_name} ${devstack_path}=/opt/stack/new/devstack [Documentation] Create Network with neutron request. ${output}= Write Commands Until Prompt cd ${devstack_path} && cat localrc Log ${output} @@ -93,86 +93,86 @@ Create Vm Instances [Arguments] ${net_id} ${vm_instance_names} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.tiny [Documentation] Create Four Vm Instance with the net id of the Netowrk. : FOR ${VmElement} IN @{vm_instance_names} - \ ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} + \ ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} \ Log ${output} View Vm Console [Arguments] ${vm_instance_names} [Documentation] View Console log of the created vm instances using nova show. : FOR ${VmElement} IN @{vm_instance_names} - \ ${output}= Write Commands Until Prompt nova show ${VmElement} + \ ${output}= Write Commands Until Prompt nova show ${VmElement} \ Log ${output} - \ ${output}= Write Commands Until Prompt nova console-log ${VmElement} + \ ${output}= Write Commands Until Prompt nova console-log ${VmElement} \ Log ${output} Ping Vm From DHCP Namespace [Arguments] ${net_id} ${vm_ip} [Documentation] Reach all Vm Instance with the net id of the Netowrk. Log ${vm_ip} - ${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s + ${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s Log ${output} [Return] ${output} Ping From Instance [Arguments] ${dest_vm} [Documentation] Ping to the expected destination ip. - ${output}= Write Commands Until Expected Prompt ping -c 3 ${dest_vm} $ + ${output}= Write Commands Until Expected Prompt ping -c 3 ${dest_vm} $ Log ${output} [Return] ${output} Curl Metadata Server [Documentation] Ping to the expected destination ip. - ${output}= Write Commands Until Expected Prompt curl -i http://169.254.169.254 $ + ${output}= Write Commands Until Expected Prompt curl -i http://169.254.169.254 $ Write Commands Until Prompt exit - Should Contain ${output} 200 + Should Contain ${output} 200 Close Vm Instance [Documentation] Exit the vm instance. - ${output}= Write Commands Until Prompt exit + ${output}= Write Commands Until Prompt exit Log ${output} Ssh Vm Instance - [Arguments] ${net_id} ${vm_ip} ${user}=cirros ${password}=cubswin:) ${key_file}=test.pem + [Arguments] ${net_id} ${vm_ip} ${user}=cirros ${password}=cubswin:) ${key_file}=test.pem [Documentation] Login to the vm instance using ssh in the network. - ${output}= Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh -i ${key_file} ${user}@${vm_ip} (yes/no)? + ${output}= Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh -i ${key_file} ${user}@${vm_ip} (yes/no)? Log ${output} - ${output}= Write Commands Until Expected Prompt yes d: + ${output}= Write Commands Until Expected Prompt yes d: Log ${output} - ${output}= Write Commands Until Expected Prompt ${password} $ + ${output}= Write Commands Until Expected Prompt ${password} $ Log ${output} - ${output}= Write Commands Until Expected Prompt ifconfig $ + ${output}= Write Commands Until Expected Prompt ifconfig $ Log ${output} - ${output}= Write Commands Until Expected Prompt route $ + ${output}= Write Commands Until Expected Prompt route $ Log ${output} Create Router [Arguments] ${router_name} [Documentation] Create Router and Add Interface to the subnets. ${output}= Write Commands Until Prompt neutron -v router-create ${router_name} - Should Contain ${output} Created a new router + Should Contain ${output} Created a new router Add Router Interface - [Arguments] ${router_name} ${interface_name} + [Arguments] ${router_name} ${interface_name} ${output}= Write Commands Until Prompt neutron -v router-interface-add ${router_name} ${interface_name} - Should Contain ${output} Added interface + Should Contain ${output} Added interface Remove Interface - [Arguments] ${router_name} ${interface_name} + [Arguments] ${router_name} ${interface_name} [Documentation] Remove Interface to the subnets. ${output}= Write Commands Until Prompt neutron -v router-interface-delete ${router_name} ${interface_name} - Should Contain ${output} Removed interface from router + Should Contain ${output} Removed interface from router Delete Router [Arguments] ${router_name} [Documentation] Delete Router and Interface to the subnets. ${output}= Write Commands Until Prompt neutron -v router-delete ${router_name} - Should Contain ${output} Deleted router: + Should Contain ${output} Deleted router: Show Debugs [Arguments] ${vm_indices} - [Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node - ${output}= Write Commands Until Prompt sudo ip netns list - Log ${output} + [Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node + ${output}= Write Commands Until Prompt sudo ip netns list + Log ${output} : FOR ${index} IN @{vm_indices} - \ ${output}= Write Commands Until Prompt nova show ${index} - \ Log ${output} + \ ${output}= Write Commands Until Prompt nova show ${index} + \ Log ${output} diff --git a/csit/libraries/Utils.robot b/csit/libraries/Utils.robot index 15e837b6a8..783a91a5ac 100644 --- a/csit/libraries/Utils.robot +++ b/csit/libraries/Utils.robot @@ -490,11 +490,10 @@ Write Commands Until Expected Prompt [Return] ${output} Install Package On Ubuntu System - [Arguments] ${package_name} ${system}=${TOOLS_SYSTEM_IP} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} - ... ${prompt_timeout}=30s + [Arguments] ${package_name} ${system}=${TOOLS_SYSTEM_IP} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s [Documentation] Keyword to install packages for testing to Ubuntu Mininet VM Log Keyword to install package to Mininet Ubuntu VM Open Connection ${system} prompt=${prompt} timeout=${prompt_timeout} Flexible Mininet Login user=${user} password=${password} Write sudo apt-get install -y ${package_name} - Read Until ${prompt} + Read Until ${prompt} diff --git a/csit/libraries/VtnCoKeywords.robot b/csit/libraries/VtnCoKeywords.robot index 97c5130731..408306fce1 100644 --- a/csit/libraries/VtnCoKeywords.robot +++ b/csit/libraries/VtnCoKeywords.robot @@ -256,7 +256,7 @@ Create VLANMAP in VBRIDGE Start vlan_topo [Documentation] This will start mininet with custom topology on both the Virtual Machines - Install Package On Ubuntu System vlan + Install Package On Ubuntu System vlan Start Mininet ${TOOLS_SYSTEM_IP} ${vlan_topo} ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH} Delete a FLOWLIST diff --git a/csit/libraries/VtnMaKeywords.robot b/csit/libraries/VtnMaKeywords.robot index c957555af2..373db05e97 100644 --- a/csit/libraries/VtnMaKeywords.robot +++ b/csit/libraries/VtnMaKeywords.robot @@ -219,7 +219,7 @@ Mininet Ping Should Not Succeed Start vlan_topo [Arguments] ${OF} [Documentation] Create custom topology for vlan functionality - Install Package On Ubuntu System vlan + Install Package On Ubuntu System vlan Run Keyword If '${OF}' == 'OF13' Start Mininet ${TOOLS_SYSTEM_IP} ${vlan_topo_13} ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH} ... ELSE IF '${OF}' == 'OF10' Start Mininet ${TOOLS_SYSTEM_IP} ${vlan_topo_10} ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH} diff --git a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot index 5f3cce7e02..444e4e2908 100644 --- a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot +++ b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot @@ -59,8 +59,8 @@ Buy_Cars_On_Follower_And_Verify Reboot_People_Leader [Documentation] Previous people Leader is rebooted. We should never stop the people first follower, this is where people are registered. - ClusterManagement.Kill_Single_Member ${people_leader_index} confirm=True - ClusterManagement.Start_Single_Member ${people_leader_index} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT} + ClusterManagement.Kill_Single_Member ${people_leader_index} confirm=True + ClusterManagement.Start_Single_Member ${people_leader_index} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT} BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config Buy_Cars_On_Leader_After_Reboot_And_Verify diff --git a/csit/suites/openstack/connectivity/01_l2_tests.robot b/csit/suites/openstack/connectivity/01_l2_tests.robot index 7aaea56cac..343996315f 100644 --- a/csit/suites/openstack/connectivity/01_l2_tests.robot +++ b/csit/suites/openstack/connectivity/01_l2_tests.robot @@ -17,7 +17,7 @@ Resource ../../../libraries/DevstackUtils.robot @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4 @{VM_IPS_NOT_DELETED} 30.0.0.4 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1 -@{DHCP_IPS} 30.0.0.2 40.0.0.2 +@{DHCP_IPS} 30.0.0.2 40.0.0.2 *** Test Cases *** Create Networks @@ -37,14 +37,14 @@ Create Vm Instances For network_1 [Documentation] Create Four Vm instances using flavor and image names for a network. ${net_id}= Get Net Id network_1 Create Vm Instances ${net_id} ${NET_1_VM_INSTANCES} - [Teardown] Show Debugs ${NET_1_VM_INSTANCES} + [Teardown] Show Debugs ${NET_1_VM_INSTANCES} Create Vm Instances For network_2 [Documentation] Create Four Vm instances using flavor and image names for a network. ${net_id}= Get Net Id network_2 Set Suite Variable ${net_id} Create Vm Instances ${net_id} ${NET_2_VM_INSTANCES} - [Teardown] Show Debugs ${NET_2_VM_INSTANCES} + [Teardown] Show Debugs ${NET_2_VM_INSTANCES} Ping All Vm Instances In network_1 [Documentation] Check reachability of vm instances by pinging to them. diff --git a/csit/suites/openstack/connectivity/02_l3_tests.robot b/csit/suites/openstack/connectivity/02_l3_tests.robot index 59e75b8e67..166ec89718 100644 --- a/csit/suites/openstack/connectivity/02_l3_tests.robot +++ b/csit/suites/openstack/connectivity/02_l3_tests.robot @@ -16,7 +16,7 @@ Resource ../../../libraries/DevstackUtils.robot @{NET_1_VM_IPS} 50.0.0.3 @{NET_2_VM_IPS} 60.0.0.3 @{GATEWAY_IPS} 50.0.0.1 60.0.0.1 -@{DHCP_IPS} 50.0.0.2 60.0.0.2 +@{DHCP_IPS} 50.0.0.2 60.0.0.2 *** Test Cases *** Create Networks @@ -36,13 +36,13 @@ Create Vm Instances For network_1 [Documentation] Create Four Vm instances using flavor and image names for a network. ${net_id}= Get Net Id network_1 Create Vm Instances ${net_id} ${NET_1_VM_INSTANCES} - [Teardown] Show Debugs ${NET_1_VM_INSTANCES} + [Teardown] Show Debugs ${NET_1_VM_INSTANCES} Create Vm Instances For network_2 [Documentation] Create Four Vm instances using flavor and image names for a network. ${net_id}= Get Net Id network_2 Create Vm Instances ${net_id} ${NET_2_VM_INSTANCES} - [Teardown] Show Debugs ${NET_2_VM_INSTANCES} + [Teardown] Show Debugs ${NET_2_VM_INSTANCES} Create Routers [Documentation] Create Router @@ -50,8 +50,8 @@ Create Routers Add Interfaces To Router [Documentation] Add Interfaces - : FOR ${interface} IN @{SUBNETS_NAME} - \ Add Router Interface router_1 ${interface} + : FOR ${interface} IN @{SUBNETS_NAME} + \ Add Router Interface router_1 ${interface} Ping Vm Instance In network_2 From network_1 [Documentation] Check reachability of vm instances by pinging to them after creating routers. @@ -109,8 +109,8 @@ Delete Vm Instances In network_2 Delete Router Interfaces [Documentation] Remove Interface to the subnets. - : FOR ${interface} IN @{SUBNETS_NAME} - \ Remove Interface router_1 ${interface} + : FOR ${interface} IN @{SUBNETS_NAME} + \ Remove Interface router_1 ${interface} Delete Routers [Documentation] Delete Router and Interface to the subnets. diff --git a/csit/suites/ovsdb/Devstack_Tempest_Tests/02__additional_flows_verification_tests.robot b/csit/suites/ovsdb/Devstack_Tempest_Tests/02__additional_flows_verification_tests.robot index 5ec2346ae1..411e7c4e6f 100644 --- a/csit/suites/ovsdb/Devstack_Tempest_Tests/02__additional_flows_verification_tests.robot +++ b/csit/suites/ovsdb/Devstack_Tempest_Tests/02__additional_flows_verification_tests.robot @@ -17,7 +17,7 @@ Resource ../../../libraries/DevstackUtils.robot @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4 @{VM_IPS_NOT_DELETED} 30.0.0.4 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1 -@{DHCP_IPS} 30.0.0.2 40.0.0.2 +@{DHCP_IPS} 30.0.0.2 40.0.0.2 *** Test Cases *** Create Networks @@ -47,13 +47,13 @@ Create Vm Instances For network_2 View Vm Console ${NET_2_VM_INSTANCES} List Networks With Namespaces - ${output}= Write Commands Until Prompt sudo ip netns list + ${output}= Write Commands Until Prompt sudo ip netns list Log ${output} Show Details of Created Vm Instance In network_1 [Documentation] View Details of the created vm instances using nova show. : FOR ${VmElement} IN @{NET_1_VM_INSTANCES} - \ ${output}= Write Commands Until Prompt nova show ${VmElement} + \ ${output}= Write Commands Until Prompt nova show ${VmElement} \ Log ${output} Ping All Vm Instances In network_1 @@ -66,7 +66,7 @@ Ping All Vm Instances In network_1 Show Details of Created Vm Instance In network_2 [Documentation] View Details of the created vm instances using nova show. : FOR ${VmElement} IN @{NET_2_VM_INSTANCES} - \ ${output}= Write Commands Until Prompt nova show ${VmElement} + \ ${output}= Write Commands Until Prompt nova show ${VmElement} \ Log ${output} Ping All Vm Instances In network_2 @@ -78,14 +78,14 @@ Ping All Vm Instances In network_2 Add Key-Pair For Vm Instance [Documentation] Creates key pair to ssh to the vm instance. - ${output}= Write Commands Until Prompt nova keypair-add test > test.pem + ${output}= Write Commands Until Prompt nova keypair-add test > test.pem Log ${output} - ${output}= Write Commands Until Prompt chmod 600 test.pem + ${output}= Write Commands Until Prompt chmod 600 test.pem Log ${output} List The Availalbe Key Pair List [Documentation] Check the existing key pairs available. - ${output}= Write Commands Until Prompt nova keypair-list + ${output}= Write Commands Until Prompt nova keypair-list Log ${output} Login to Vm Instances In network_1 Using Ssh -- 2.36.6