Changed the way to access juju data in k8s_08 testsuite.
[osm/tests.git] / robot-systest / lib / juju_lib.robot
index 2eab9bf..94db455 100644 (file)
@@ -16,21 +16,19 @@ ${success_return_code}   0
 
 *** Keywords ***
 Get Scale Number
-    [Arguments]   ${application_name}   ${model_name}
+    [Arguments]   ${host}   ${username}   ${password}   ${privatekey}   ${application_name}   ${model_name}
 
     Should Not Be Empty   ${application_name}   ${model_name}
-    ${rc}   ${stdout}=   Run and Return RC and Output   juju show-status ${application_name} --format yaml -m ${model_name} | grep scale | awk -F ': ' '{print $2}'
+    ${stdout}=   Execute Remote Command Check Rc Return Output   ${host}   ${username}   ${password}   ${privatekey}   juju show-status ${application_name} --format yaml -m ${model_name} | grep scale | awk -F ': ' '{print $2}'
     log   ${stdout}
-    Should Be Equal As Integers   ${rc}   ${success_return_code}
     [Return]  ${stdout}
 
 Get Model Name
-    [Arguments]   ${ns_id}   ${kdu_name}
+    [Arguments]   ${host}   ${username}   ${password}   ${privatekey}   ${ns_id}   ${kdu_name}
 
     Should Not Be Empty   ${ns_id}   ${kdu_name}
-    ${rc}   ${stdout}=   Run and Return RC and Output   juju models | grep -i ${kdu_name} | grep -i ${ns_id} | cut -f1 -d " "
+    ${stdout}=   Execute Remote Command Check Rc Return Output   ${host}   ${username}   ${password}   ${privatekey}   juju models | grep -i ${kdu_name} | grep -i ${ns_id} | cut -f1 -d " "
     log   ${stdout}
-    Should Be Equal As Integers   ${rc}   ${success_return_code}
     ${model_name}=   Set Variable   ${kdu_name}-${ns_id}
     Should Be Equal As Strings   ${model_name}   ${stdout}
-    [Return]  ${stdout}
\ No newline at end of file
+    [Return]  ${stdout}