*** 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
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}
${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
Get Test Teardown Debugs
[Arguments] ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS}
+ ODLTools.Get All test_name=${test_name}
OpenStackOperations.Get OvsDebugInfo
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${HA_PROXY_IP} ${netvirt_data_models}
- BuiltIn.run Keyword And Ignore Error ODLTools.Get EOS ${HA_PROXY_IP}
KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail}
Get Suite Debugs
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
BuiltIn.Run Keyword If "${PRE_CLEAN_OPENSTACK_ALL}"=="True" OpenStack Cleanup All
OpenStackOperations.Add OVS Logging On All OpenStack Nodes
Run_Keyword_If_At_Least_Oxygen Wait Until Keyword Succeeds 60 2 ClusterManagement.Check Status Of Services Is OPERATIONAL @{NETVIRT_DIAG_SERVICES}
- ClusterManagement.Dump_Local_Shards_For_Each_Member
Verify Expected Default Tables On Nodes
OpenStack Suite Teardown