-
- Variable Should Exist ${vnf_id1} msg=VNF2 is not available
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface1_name}")' | yq '."ip-address"' | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Should Match Regexp ${stdout} ${datanet1_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet1_prefix}
- Set Suite Variable ${vnf2_ip1} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface2_name}")' | yq '."ip-address"' | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Should Match Regexp ${stdout} ${datanet2_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet2_prefix}
- Set Suite Variable ${vnf2_ip2} ${stdout}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${iface3_name}")' | yq '."ip-address"' | tr -d \\"
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Should Match Regexp ${stdout} ${datanet3_prefix} msg=${stdout} doesn't match subnet's regexp ${datanet3_prefix}
- Set Suite Variable ${vnf2_ip3} ${stdout}
-
+ [Documentation] Check whether IP addresses of the second VNF in the VNF record meet the expected CIDR.
+ Variable Should Exist ${VNF_ID1} msg=VNF2 is not available
+ ${rc} ${stdout}= Run And Return RC And Output osm vnf-show ${VNF_ID2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${IFACE1_NAME}")' | yq -r '."ip-address"'
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False
+ Should Match Regexp ${stdout} ${DATANET1_PREFIX} msg=${stdout} doesn't match subnet's regexp ${DATANET1_PREFIX}
+ Set Suite Variable ${VNF2_IP1} ${stdout}
+ ${rc} ${stdout}= Run And Return RC And Output osm vnf-show ${VNF_ID2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${IFACE2_NAME}")' | yq -r '."ip-address"'
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False
+ Should Match Regexp ${stdout} ${DATANET2_PREFIX} msg=${stdout} doesn't match subnet's regexp ${DATANET2_PREFIX}
+ Set Suite Variable ${VNF2_IP2} ${stdout}
+ ${rc} ${stdout}= Run And Return RC And Output osm vnf-show ${VNF_ID2} --literal | yq '.vdur[0].interfaces[] | select(.name == "${IFACE3_NAME}")' | yq -r '."ip-address"'
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=${stdout} values=False
+ Should Match Regexp ${stdout} ${DATANET3_PREFIX} msg=${stdout} doesn't match subnet's regexp ${DATANET3_PREFIX}
+ Set Suite Variable ${VNF2_IP3} ${stdout}
+
+Verify Vnf1 Interfaces
+ [Documentation] Check whether IP addresses of the first VNF configured inside the VM meet the expected CIDR.
+ 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
+ [Documentation] Check whether IP addresses of the second VNF configured inside the VM meet the expected CIDR.
+ 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}