Launching the NS using the Dualstackip
[osm/tests.git] / robot-systest / lib / ns_lib.robot
index a37e509..c8da271 100644 (file)
@@ -415,4 +415,13 @@ Cancel operation By Id
     ${rc}   ${stdout}=   Run and Return RC and Output   osm ns-op-cancel ${op_id} --cancel_mode ${cancel_mode} --wait
     Log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${success_return_code}
-    [Return]   ${stdout}
\ No newline at end of file
+    [Return]   ${stdout}
+
+GET Dual Ip
+    [Documentation]   Get dual ip from the ns list
+    [Arguments]   ${ns_id}
+    Should Not Be Empty   ${ns_id}
+    ${rc}   ${stdout}=   Run and Return RC and Output   osm ns-show ${ns_id} --literal | grep -A2 ip-address | awk '{print $2}' | paste -sd ',' | sed 's/^,//; s/,/, /g' | sed 's/^/[/; s/$/]/'
+    Log   ${stdout}
+    [Return]   ${stdout}
+