From: Sam Hague Date: Sun, 12 Aug 2018 19:38:13 +0000 (-0400) Subject: Use Process lib for openstack cli X-Git-Tag: pre-potassium~616 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=72b6608c7bfb1a8438dd3bb5f2a94c0aa2fc47ff Use Process lib for openstack cli Change-Id: Ib21107a2dae58a0bf7874cf6f430f7ef73fff3bf Signed-off-by: Sam Hague --- diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index 5c6fd65ab8..b51f6f26f0 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 @@ -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