Bug 2327 fix to verify ipaddress in sol003_02 testsuite

Change-Id: I9896f70aa0bc4f62ba1b21106bcf9b8b9ed464ac
Signed-off-by: sritharan <priyadarshini@tataelxsi.co.in>
diff --git a/robot-systest/lib/ns_lib.resource b/robot-systest/lib/ns_lib.resource
index 8e47f1f..ab763e1 100644
--- a/robot-systest/lib/ns_lib.resource
+++ b/robot-systest/lib/ns_lib.resource
@@ -216,6 +216,14 @@
     [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/$/]/'
+    ${rc}   ${stdout}=   Run And Return RC And Output   osm ns-show ${ns_id} --literal | grep -A2 ip-address | grep -v "ip-address:" | awk '{print $2}' | tr -d ',-'
     Log   ${rc},${stdout}
     RETURN   ${stdout}
+
+Get NSD Id From The NS
+    [Documentation]   Get the nsd id from the ns
+    [Arguments]   ${ns_id}
+    Should Not Be Empty   ${ns_id}
+    ${stdout}=   Run   osm ns-show ${ns_id} --literal | grep nsd-id | awk '{print $2}'
+    Log   ${stdout}
+    RETURN   ${stdout}
diff --git a/robot-systest/lib/nsd_lib.resource b/robot-systest/lib/nsd_lib.resource
index 175322b..0821b1f 100644
--- a/robot-systest/lib/nsd_lib.resource
+++ b/robot-systest/lib/nsd_lib.resource
@@ -61,3 +61,10 @@
     ${rc}   ${stdout}=   Run And Return Rc And Output   osm nspkg-list | awk '{print $2}' | grep ${nsd_id}
     Log   ${rc},${stdout}
     Should Not Be Equal As Strings   ${stdout}   ${nsd_id}
+
+Get NSD Ip
+    [Documentation]   To get the Ip from the Nsd
+    [Arguments]   ${nsd_id}
+    ${stdout}=   Run   osm nsd-show ${nsd_id} --literal | grep -A2 ip-address | grep -v "ip-address:" | awk '{print $2}' | tr -d ',-'
+    Log   ${stdout}
+    RETURN   ${stdout}