Fix stderr parse into JSON for OS List opers 08/75108/3
authorTim Rozet <trozet@redhat.com>
Fri, 10 Aug 2018 16:02:19 +0000 (12:02 -0400)
committerTim Rozet <trozet@redhat.com>
Fri, 10 Aug 2018 16:39:14 +0000 (12:39 -0400)
The list operation is looking to parse json, however stderr will include
warnings from the openstack client, like this one:
https://storyboard.openstack.org/#!/story/2003132

Therefore parsing to json will fail. This patch changes the List
operations to only parse stdout as json.

Change-Id: Ib6dc6b99f13b3288effc5e9c2e6c5cda4636d5a7
Signed-off-by: Tim Rozet <trozet@redhat.com>
csit/libraries/OpenStackOperations.robot

index 5c6fd65ab83b6a62f782d405e5605b9cd3b34925..61e8fc8d2f64718c22fe71752556bb30dbc8142a 100644 (file)
@@ -943,8 +943,8 @@ 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}
+    ${result} =    Run Process With Logging And Status Check    ${cmd}
+    @{list} =    RequestsLibrary.To Json    ${result.stdout}
     BuiltIn.Log    ${list}
     [Return]    @{list}