Don't process the prompt line 32/65332/3
authorSam Hague <shague@redhat.com>
Wed, 8 Nov 2017 18:51:14 +0000 (13:51 -0500)
committerSam Hague <shague@redhat.com>
Wed, 8 Nov 2017 20:08:49 +0000 (15:08 -0500)
The Write Commands Until Expected Prompt Keyword
executes a command and then reads output until it sees
the prompt. It then returns all that read output. This
output is then split into lines - which means you get
the prompt line also.

This patch instructs Split To Lines to ignore the last
line (-1).

Change-Id: Ifea842f5b0fa0c45818be4e9cbaa2f0b33774af6
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/OpenStackOperations.robot

index 553682ab7b67f4bb29bb6abee8af57088afe40ee..7170dfda91e118e3c33c4d9e17c90266e4f0cf34 100644 (file)
@@ -587,7 +587,7 @@ Get DumpFlows And Ovsconfig
     Write Commands Until Expected Prompt    ip route    ${DEFAULT_LINUX_PROMPT_STRICT}
     Write Commands Until Expected Prompt    arp -an    ${DEFAULT_LINUX_PROMPT_STRICT}
     ${nslist}=    Write Commands Until Expected Prompt    ip netns list | awk '{print $1}'    ${DEFAULT_LINUX_PROMPT_STRICT}
-    @{lines}    Split To Lines    ${nslist}
+    @{lines}    Split To Lines    ${nslist}    end=-1
     : FOR    ${line}    IN    @{lines}
     \    Write Commands Until Expected Prompt    sudo ip netns exec ${line} ip -o link    ${DEFAULT_LINUX_PROMPT_STRICT}
     \    Write Commands Until Expected Prompt    sudo ip netns exec ${line} ip -o addr    ${DEFAULT_LINUX_PROMPT_STRICT}