From: Yi Yang Date: Thu, 14 Feb 2019 03:38:12 +0000 (-0500) Subject: Fix OpenStack CLI Get List error X-Git-Tag: pre-potassium~372 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=e6e32a086559fbe0a59558175b6f6b3b0c99f34f Fix OpenStack CLI Get List error In OpenStack CLI Get List error, RequestsLibrary.To Json ${json} will result in exception if return value of OpenStack CLI is empty, i.e. ${json} is empty, this will terminate current keyword/test case, it isn't what we expect. This commit fixed this error and make sure current keyword/test case can be run normally. Change-Id: If36e27f092e66920004cfc09e9a6d6ec88bf5b51 JIRA: INTTEST-56 Signed-off-by: Yi Yang --- diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index a1ca371ac6..ec08b781ff 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -1100,9 +1100,9 @@ OpenStack List All 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} + @{list} = BuiltIn.Run Keyword If ${json} RequestsLibrary.To Json ${json} + ... ELSE BuiltIn.Create List BuiltIn.Log ${list} [Return] @{list}