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>
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}