Add tags for 'prepare' and 'verify' stages to help the testing of OSM version migrati...
[osm/tests.git] / robot-systest / lib / ns_lib.robot
index 4d6b16f..0976241 100644 (file)
@@ -76,6 +76,17 @@ Get Vnf Id
     [Return]  ${stdout}
 
 
+Get Ns Id
+    [Arguments]   ${ns_name}
+
+    Should Not Be Empty   ${ns_name}
+    ${rc}   ${stdout}=   Run and Return RC and Output   osm ns-list | grep ${ns_name} | awk '{print $4}' 2>&1
+    log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+    Should Not Be Empty   ${stdout}
+    [Return]   ${stdout}
+
+
 Get Ns Vnf List
     [Arguments]   ${ns_id}