X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FOpenStackOperations.robot;h=1d6051e8fa9ea92d72a512d6f9267bcd5b625c2e;hb=3060158ef20adae464e65bf3e6d9717bf58fc56c;hp=1e482b40dccbac92b0c6ec24c1cd373caac79d75;hpb=c2708f9c1052be0cf75a9299fb083661b09be059;p=integration%2Ftest.git diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index 1e482b40dc..1d6051e8fa 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -932,8 +932,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 @@ -964,15 +963,13 @@ OpenStack CLI With No Log 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} \ 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 @@ -1008,6 +1005,7 @@ OpenStack Suite Setup BuiltIn.Run Keyword If "${PRE_CLEAN_OPENSTACK_ALL}"=="True" OpenStack Cleanup All OpenStackOperations.Add OVS Logging On All OpenStack Nodes ClusterManagement.Dump_Local_Shards_For_Each_Member + Verify Expected Default Tables On Nodes OpenStack Suite Teardown [Documentation] Wrapper teardown keyword that can be used in any suite running in an openstack environement @@ -1103,3 +1101,29 @@ Get Network Segmentation Id ${output} = OpenStack CLI openstack network show ${network_name} | grep segmentation_id | awk '{print $4}' @{list} = String.Split String ${output} [Return] @{list}[0] + +Verify Expected Default Tables On Nodes + [Arguments] ${node_ips}=@{OS_ALL_IPS} + [Documentation] Verify if Default Table Entries are programmed on all Nodes + : FOR ${node_ip} IN @{node_ips} + \ Verify Expected Default Tables ${node_ip} + +Verify Expected Default Tables + [Arguments] ${ovs_ip} + [Documentation] Verify if Default Table Entries are programmed on specific Node + ${flow_dump} = Utils.Write Commands Until Expected Prompt sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT} + BuiltIn.Log ${flow_dump} + : FOR ${table} IN @{DEFAULT_FLOW_TABLES} + \ Builtin.Should Match Regexp ${flow_dump} .*table=${table}.*priority=0 + +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}