Use the gitlab repo for OSM packages
[osm/devops.git] / robot-systest / lib / nsd_lib.robot
index 8af1379..5687309 100644 (file)
 # 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019
 ##
 
+*** Settings ***
+Library   String
+
+
 *** Variables ***
 ${success_return_code}   0
 ${delete_max_wait_time}   1min
@@ -41,7 +45,10 @@ Create NSD
     ${rc}   ${stdout}=   Run and Return RC and Output   osm nsd-create ${nsd_pkg}
     log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${success_return_code}
-    [Return]  ${stdout}
+    ${lines}=  Get Line Count  ${stdout}
+    ${last}=  Evaluate  ${lines} - 1
+    ${id}=  Get Line  ${stdout}  ${last}
+    [Return]  ${id}
 
 
 Delete NSD