Update basic_18 to check interfaces order in VDUs 93/12193/2
authoraguilard <e.dah.tid@telefonica.com>
Fri, 10 Jun 2022 10:58:09 +0000 (12:58 +0200)
committeraguilard <e.dah.tid@telefonica.com>
Wed, 6 Jul 2022 08:47:55 +0000 (10:47 +0200)
Change-Id: I0c69e72f16ebbe978dba00a3c7ae0c7801745840
Signed-off-by: aguilard <e.dah.tid@telefonica.com>
robot-systest/testsuite/basic_18-ns_ip_profile.robot

index 9bc2391..1d4dc46 100644 (file)
@@ -124,11 +124,35 @@ Check Vnf2 IPs
     Set Suite Variable   ${vnf2_ip3}   ${stdout}
 
 
+Verify Vnf1 Interfaces
+
+    Variable Should Exist   ${vnf1_ipmgmt}   msg=IP address of the data VNF '${vnf_member_index_1}' is not available
+    Variable Should Exist   ${privatekey}   msg=SSH private key not available
+    Sleep   10 seconds   Wait for SSH daemon to be up
+    ${stdout}=   Execute Remote Command Check Rc Return Output   ${vnf1_ipmgmt}   ${username}   ${EMPTY}   ${privatekey}   ip --brief addr show up | grep -v "^lo" | awk '{print $3}'
+    log   ${stdout}
+    @{ip} =   Split String   ${stdout}
+    Should Match Regexp   ${ip}[1]   ${datanet1_prefix}   msg=${ip}[1] doesn't match subnet's regexp ${datanet1_prefix}
+    Should Match Regexp   ${ip}[2]   ${datanet2_prefix}   msg=${ip}[2] doesn't match subnet's regexp ${datanet2_prefix}
+    Should Match Regexp   ${ip}[3]   ${datanet3_prefix}   msg=${ip}[3] doesn't match subnet's regexp ${datanet3_prefix}
+
+
+Verify Vnf2 Interfaces
+
+    Variable Should Exist   ${vnf2_ipmgmt}   msg=IP address of the data VNF '${vnf_member_index_2}' is not available
+    Variable Should Exist   ${privatekey}   msg=SSH private key not available
+    ${stdout}=   Execute Remote Command Check Rc Return Output   ${vnf2_ipmgmt}   ${username}   ${EMPTY}   ${privatekey}   ip --brief addr show up | grep -v "^lo" | awk '{print $3}'
+    log   ${stdout}
+    @{ip} =   Split String   ${stdout}
+    Should Match Regexp   ${ip}[1]   ${datanet1_prefix}   msg=${ip}[1] doesn't match subnet's regexp ${datanet1_prefix}
+    Should Match Regexp   ${ip}[2]   ${datanet2_prefix}   msg=${ip}[2] doesn't match subnet's regexp ${datanet2_prefix}
+    Should Match Regexp   ${ip}[3]   ${datanet3_prefix}   msg=${ip}[3] doesn't match subnet's regexp ${datanet3_prefix}
+
+
 Ping from Vnf1 to Vnf2
 
     Variable Should Exist   ${vnf1_ipmgmt}   msg=IP address of the data VNF '${vnf_member_index_1}' is not available
     Variable Should Exist   ${privatekey}   msg=SSH private key not available
-    Sleep   30 seconds   Wait for SSH daemon to be up
     ${stdout}=   Execute Remote Command Check Rc Return Output   ${vnf1_ipmgmt}   ${username}   ${EMPTY}   ${privatekey}   ip addr ; ping -c 5 ${vnf2_ipmgmt}
     log   ${stdout}
     ${stdout}=   Execute Remote Command Check Rc Return Output   ${vnf1_ipmgmt}   ${username}   ${EMPTY}   ${privatekey}   ping -c 5 ${vnf2_ip1}