NexusKeywords: splitting commands to get downlaoded sw version 65/47065/11
authorPeter Gubka <pgubka@cisco.com>
Tue, 18 Oct 2016 11:11:30 +0000 (13:11 +0200)
committerVratko Polák <vrpolak@cisco.com>
Thu, 20 Oct 2016 18:29:10 +0000 (18:29 +0000)
Change-Id: Id14c89991856acbc16e4db63009c3db8e23df8e6
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/libraries/NexusKeywords.robot

index 62ec47273b85523105ce905d44e9ef479782da12..5f44b5f956dcb8ff02d56eaa48c137b948e8fe16 100644 (file)
@@ -91,8 +91,8 @@ Deploy_Artifact
     ${version}    ${location} =    NexusKeywords__Detect_Version_To_Pull    ${component}
     # TODO: Use RequestsLibrary and String instead of curl and bash utilities?
     ${url} =    BuiltIn.Set_Variable    ${urlbase}/${location}/${artifact}/${version}
-    ${namepart} =    SSHLibrary.Execute_Command    curl -L ${url}/maven-metadata.xml | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1
-    BuiltIn.Log    ${namepart}
+    ${metadata}=    SSHKeywords.Execute_Command_Should_Pass    curl -L ${url}/maven-metadata.xml
+    ${namepart}=    SSHKeywords.Execute_Command_Should_Pass    echo "${metadata}" | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1    stderr_must_be_empty=${True}
     ${length} =    BuiltIn.Get_Length    ${namepart}
     ${namepart} =    BuiltIn.Set_Variable_If    ${length} == 0    ${version}    ${namepart}
     ${filename} =    BuiltIn.Set_Variable    ${name_prefix}${namepart}${name_suffix}