X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FOpenStackOperations.robot;h=b43ee7aeaeb3f990f376a6525a7f9cc837defe9c;hb=09a995a3a18ba1e05da0a5fe74d5a358d06da31e;hp=5c6fd65ab83b6a62f782d405e5605b9cd3b34925;hpb=c6092598a61bbc40918b6373319a2e9b6017eea6;p=integration%2Ftest.git diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index 5c6fd65ab8..b43ee7aeae 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -1,6 +1,7 @@ *** 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 @@ -500,7 +501,7 @@ Remove Interface 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} @@ -508,9 +509,9 @@ Update Router ${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 @@ -550,9 +551,9 @@ Get OvsDebugInfo 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 @@ -951,17 +952,18 @@ OpenStack CLI Get List 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 @@ -1008,7 +1010,6 @@ OpenStack Suite Setup 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