2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
16 Documentation [EPA-05] EPA underlay PASSTHROUGH.
18 Library OperatingSystem
23 Resource ../lib/vnfd_lib.resource
24 Resource ../lib/vnf_lib.resource
25 Resource ../lib/nsd_lib.resource
26 Resource ../lib/ns_lib.resource
27 Resource ../lib/ssh_lib.resource
28 Resource ../lib/openstack_lib.resource
30 Test Tags epa_05 cluster_epa
32 Suite Teardown Run Keyword And Ignore Error Suite Cleanup
36 # NS and VNF descriptor package folder and ids
37 ${VNFD_PKG} epa_1vm_passthrough_vnf
38 ${VNFD_NAME} epa_1vm_passthrough-vnf
39 ${NSD_PKG} epa_1vm_passthrough_ns
40 ${NSD_NAME} epa_1vm_passthrough-ns
43 # Fixed IPs and subnet for datanet VL
44 ${DATANET_SUBNET} 192.168.110.0/24
45 ${DATANET_IP1} 192.168.110.11
46 ${DATANET_IP2} 192.168.110.22
48 ${VNF_MEMBER_INDEX_1} vnf1
49 ${VNF_MEMBER_INDEX_2} vnf2
52 ${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} , {name: datanet, ip-profile: {ip-version: ipv4, subnet-address: "${DATANET_SUBNET}"}, vnfd-connection-point-ref: [ {member-vnf-index-ref: "${VNF_MEMBER_INDEX_1}", vnfd-connection-point-ref: vnf-data-ext, ip-address: "${DATANET_IP1}"}, {member-vnf-index-ref: "${VNF_MEMBER_INDEX_2}", vnfd-connection-point-ref: vnf-data-ext, ip-address: "${DATANET_IP2}"}]} ] }
53 ${SUCCESS_RETURN_CODE} 0
58 [Documentation] Upload VNF package for the testsuite.
59 Remove Environment Variable OVERRIDES
60 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
63 [Documentation] Upload NS package for the testsuite.
64 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
66 Instantiate Network Service
67 [Documentation] Instantiate NS for the testsuite.
68 ${id}= Create Network Service ${NSD_NAME} %{VIM_TARGET} ${NS_NAME} ${NS_CONFIG} ${EMPTY}
69 Set Suite Variable ${NS_ID} ${id}
71 Get Management Ip Addresses
72 [Documentation] Get the mgmt IP addresses of both VNF of the NS.
73 Variable Should Exist ${NS_ID} msg=Network service instance is not available
74 ${ip}= Get Vnf Management Ip Address ${NS_ID} ${VNF_MEMBER_INDEX_1}
75 Set Suite Variable ${IP_MGMT_1} ${ip}
77 ${ip}= Get Vnf Management Ip Address ${NS_ID} ${VNF_MEMBER_INDEX_2}
78 Set Suite Variable ${IP_MGMT_2} ${ip}
81 Ping from Vnf1 to Vnf2
82 [Documentation] Check connectivity from the first VNF to the second VNF using ping.
83 Variable Should Exist ${IP_MGMT_1} msg=IP address of the data VNF '${VNF_MEMBER_INDEX_1}' is not available
84 Sleep 30 seconds Wait for SSH daemon to be up
85 ${stdout}= Execute Remote Command Check Rc Return Output ${IP_MGMT_1} ${USERNAME} ${PASSWORD} ${EMPTY} ip addr ; ping -c 5 ${DATANET_IP2}
88 Ping from Vnf2 to Vnf1
89 [Documentation] Check connectivity from the second VNF to the first VNF using ping.
90 Variable Should Exist ${IP_MGMT_2} msg=IP address of the data VNF '${VNF_MEMBER_INDEX_2}' is not available
91 ${stdout}= Execute Remote Command Check Rc Return Output ${IP_MGMT_2} ${USERNAME} ${PASSWORD} ${EMPTY} ip addr ; ping -c 5 ${DATANET_IP1}
95 [Documentation] Delete NS instance.
100 [Documentation] Delete NS package from OSM.
102 Delete NSD ${NSD_NAME}
104 Delete VNF Descriptor
105 [Documentation] Delete VNF package from OSM.
107 Delete VNFD ${VNFD_NAME}
112 [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
113 Run Keyword If Any Tests Failed Delete NS ${NS_NAME}
114 Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME}
115 Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}