OpenStack List All
[Documentation] Get a list of different OpenStack resources that might be in use.
- @{modules} = BuiltIn.Create List floating ip server router port network
- ... subnet security group security group rule
+ @{modules} = BuiltIn.Create List server port network subnet security group
+ ... security group rule
+ Run Keyword If "${ODL_ENABLE_L3_FWD}"=="yes" Append To List ${modules} floating ip router
: FOR ${module} IN @{modules}
\ OpenStack CLI openstack ${module} list
OpenStack CLI Get List
[Arguments] ${cmd}
[Documentation] Return a json list from the output of an OpenStack command.
+ @{list} = BuiltIn.Create List
${json} = OpenStack CLI ${cmd}
@{list} = RequestsLibrary.To Json ${json}
BuiltIn.Log ${list}
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} = OpenStack CLI Get List openstack floating ip list -f json
+ @{fips} = Run Keyword If "${ODL_ENABLE_L3_FWD}"=="yes" OpenStack CLI Get List openstack floating ip list -f json
+ ... ELSE Create List @{EMPTY}
: 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} = OpenStack CLI Get List openstack router list -f json
+ @{routers} = Run Keyword If "${ODL_ENABLE_L3_FWD}"=="yes" OpenStack CLI Get List openstack router list -f json
+ ... ELSE Create List @{EMPTY}
: FOR ${router} IN @{routers}
\ BuiltIn.Run Keyword And Ignore Error Cleanup Router ${router['ID']}
@{ports} = OpenStack CLI Get List openstack port list -f json
Is Feature Installed
[Arguments] ${features}=none
- : FOR ${feature} IN ${features}
+ : FOR ${feature} IN @{features}
\ ${status} ${output} Run Keyword And Ignore Error Builtin.Should Contain ${CONTROLLERFEATURES} ${feature}
\ Return From Keyword If "${status}" == "PASS" True
[Return] False