change get_field to awk command to make tests less reliant on devstack 44/47044/1
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 18 Oct 2016 00:04:26 +0000 (17:04 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 18 Oct 2016 00:04:26 +0000 (17:04 -0700)
Change-Id: I51d6417b38433f69a932ec96ec9e72391dad6cc8
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/OpenStackOperations.robot

index 5a62acfc68dea149715ef5e98a599a0a0d0965c2..8ed3d26a8c5b7ba5f877e6cbbaea834b4a5477c4 100644 (file)
@@ -146,7 +146,7 @@ Get Net Id
     [Arguments]    ${network_name}    ${devstack_conn_id}
     [Documentation]    Retrieve the net id for the given network name to create specific vm instance
     Switch Connection    ${devstack_conn_id}
-    ${output}=    Write Commands Until Prompt    neutron net-list | grep "${network_name}" | get_field 1    30s
+    ${output}=    Write Commands Until Prompt    neutron net-list | grep "${network_name}" | awk '{print $2}'    30s
     Log    ${output}
     ${splitted_output}=    Split String    ${output}    ${EMPTY}
     ${net_id}=    Get from List    ${splitted_output}    0
@@ -168,7 +168,7 @@ Get Router Id
     [Arguments]    ${router1}    ${devstack_conn_id}
     [Documentation]    Retrieve the net id for the given network name to create specific vm instance
     Switch Connection    ${devstack_conn_id}
-    ${output}=    Write Commands Until Prompt    neutron router-list | grep "${router1}" | get_field 1    30s
+    ${output}=    Write Commands Until Prompt    neutron router-list | grep "${router1}" | awk '{print $2}'    30s
     Log    ${output}
     ${splitted_output}=    Split String    ${output}    ${EMPTY}
     ${router_id}=    Get from List    ${splitted_output}    0