Robot testcase for DualStackip

Change-Id: Ic21e3b4aa35718dc2d9dad91a2ae57f45c5defcd
Signed-off-by: rarik <arika.r@tataelxsi.co.in>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/robot-systest/lib/openstack_lib.resource b/robot-systest/lib/openstack_lib.resource
index ff4b46d..3ad237b 100644
--- a/robot-systest/lib/openstack_lib.resource
+++ b/robot-systest/lib/openstack_lib.resource
@@ -191,3 +191,17 @@
     Log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${SUCCESS_RETURN_CODE}
     RETURN   ${stdout}
+
+Openstack Server List
+    [Documentation]   Get the openstack server list
+    [Arguments]   ${ns_name}
+    ${result}=   Run And Return Rc And Output   openstack server list | grep ${ns_name} | awk 'index($0, "ipv6=") {gsub(/,$/, ""); gsub("ipv6=", ""); print $8, $9}'
+    ${rc}=   Get From List   ${result}   0
+    ${Ip}=   Get From List   ${result}   1
+    Log   ${Ip}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+    RETURN   ${Ip}
+
+Source Openrc Command
+    [Documentation]   Keyword to source openstack tenant
+    Write   source openrc
diff --git a/robot-systest/lib/rest_lib.resource b/robot-systest/lib/rest_lib.resource
index 74e97e9..82c95d2 100644
--- a/robot-systest/lib/rest_lib.resource
+++ b/robot-systest/lib/rest_lib.resource
@@ -65,7 +65,7 @@
 
 Read Directory
     [Documentation]   Read Current Directory and return it
-    ${Directory}=   Replace String   ${CURDIR}   lib   resources/
+    ${Directory}=   Replace String   ${CURDIR}   lib   resources
     ${json_path}=   Set Variable   ${Directory}
     RETURN   ${json_path}
 
diff --git a/robot-systest/resources/sol003_Dualstackip.json b/robot-systest/resources/sol003_02-dualstack_ip_vnfm.json
similarity index 99%
rename from robot-systest/resources/sol003_Dualstackip.json
rename to robot-systest/resources/sol003_02-dualstack_ip_vnfm.json
index a1b1b49..74cc2ef 100644
--- a/robot-systest/resources/sol003_Dualstackip.json
+++ b/robot-systest/resources/sol003_02-dualstack_ip_vnfm.json
@@ -38,4 +38,3 @@
       }
    ]
 }
-
diff --git a/robot-systest/testsuite/sol003_02-dualstack_ip_vnfm.robot b/robot-systest/testsuite/sol003_02-dualstack_ip_vnfm.robot
index 6a2ae7a..b489dc4 100644
--- a/robot-systest/testsuite/sol003_02-dualstack_ip_vnfm.robot
+++ b/robot-systest/testsuite/sol003_02-dualstack_ip_vnfm.robot
@@ -53,7 +53,7 @@
     Set Suite Variable   ${CREATED_VIM_ACCOUNT_ID}
     Get Auth Token
     ${json_path}=   Read Directory
-    ${json_obj}=   Load JSON From File   ${json_path}/sol003_DualStackip.json
+    ${json_obj}=   Load JSON From File   ${json_path}/sol003_02-dualstack_ip_vnfm.json
     ${json_obj}=   Get Variable Value   ${json_obj['data'][0]}
     ${NS_NAME}=   Get Variable Value   ${json_obj['vnfInstanceName']}
     Set Suite Variable   ${NS_NAME}
@@ -78,7 +78,7 @@
     Get Vnf List
     Get Auth Token
     ${json_path}=   Read Directory
-    ${json_obj}=   Load JSON From File   ${json_path}/sol003_DualStackip.json
+    ${json_obj}=   Load JSON From File   ${json_path}/sol003_02-dualstack_ip_vnfm.json
     ${json_obj}=   Get Variable Value   ${json_obj['data'][1]}
     ${UPDATED_JSON_OBJ}=   JSONLibrary.Update Value To Json   ${json_obj}   $..vimAccountId   ${CREATED_VIM_ACCOUNT_ID}
     ${UPDATED_JSON_OBJ}=   JSONLibrary.Update Value To Json   ${UPDATED_JSON_OBJ}   $..vnfId   ${CREATEID}
@@ -165,7 +165,7 @@
     [Documentation]   Test case to terminate the VNF
     Get Auth Token
     ${json_path}=   Read Directory
-    ${UPDATED_JSON_OBJ}=   Load JSON From File   ${json_path}/sol003_DualStackip.json
+    ${UPDATED_JSON_OBJ}=   Load JSON From File   ${json_path}/sol003_02-dualstack_ip_vnfm.json
     ${UPDATED_JSON_OBJ}=   Get Variable Value   ${UPDATED_JSON_OBJ['data'][3]}
     Set Suite Variable   ${UPDATED_JSON_OBJ}
     Post Api Request   ${VNF_INSTANCE_URI}/${CREATEID}/terminate   ${UPDATED_JSON_OBJ}