1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
14 Documentation [EPA-05] EPA underlay PASSTHROUGH.
16 Library OperatingSystem
21 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
22 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnf_lib.robot
23 Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
24 Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
25 Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
26 Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot
28 Variables %{ROBOT_DEVOPS_FOLDER}/resources/epa_05-epa_underlay_passthrough.py
30 Suite Teardown Run Keyword And Ignore Error Suite Cleanup
33 ${vnf_member_index_1} 1
34 ${vnf_member_index_2} 2
37 ${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: "1", vnfd-connection-point-ref: vnf-data-ext, ip-address: "${datanet_ip1}"}, {member-vnf-index-ref: "2", vnfd-connection-point-ref: vnf-data-ext, ip-address: "${datanet_ip2}"}]} ] }
38 ${success_return_code} 0
43 [Tags] epa_underlay_passthrough sanity regression
45 Remove Environment Variable OVERRIDES
46 Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
50 [Tags] epa_underlay_passthrough sanity regression
52 Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
55 Instantiate Network Service
56 [Tags] epa_underlay_passthrough sanity regression
58 ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
59 Set Suite Variable ${ns_id} ${id}
62 Get Management Ip Addresses
63 [Tags] epa_underlay_passthrough sanity regression
65 Variable Should Exist ${ns_id} msg=Network service instance is not available
66 ${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
67 Set Suite Variable ${ip_mgmt_1} ${ip}
70 ${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
71 Set Suite Variable ${ip_mgmt_2} ${ip}
75 Ping from Vnf1 to Vnf2
76 [Tags] epa_underlay_passthrough sanity regression
78 Variable Should Exist ${ip_mgmt_1} msg=IP address of the data VNF '${vnf_member_index_1}' is not available
79 Variable Should Exist ${privatekey} msg=SSH private key not available
80 Sleep 30 seconds Wait for SSH daemon to be up
81 ${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_1} ${username} ${password} ${privatekey} ip addr ; ping -c 5 ${datanet_ip2}
85 Ping from Vnf2 to Vnf1
86 [Tags] epa_underlay_passthrough sanity regression
88 Variable Should Exist ${ip_mgmt_2} msg=IP address of the data VNF '${vnf_member_index_2}' is not available
89 Variable Should Exist ${privatekey} msg=SSH private key not available
90 ${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_2} ${username} ${password} ${privatekey} ip addr ; ping -c 5 ${datanet_ip1}
95 [Tags] epa_underlay_passthrough sanity regression cleanup
101 [Tags] epa_underlay_passthrough sanity regression cleanup
103 Delete NSD ${nsd_name}
106 Delete VNF Descriptor
107 [Tags] epa_underlay_passthrough sanity regression cleanup
109 Delete VNFD ${vnfd_name}
115 [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
117 Run Keyword If Any Tests Failed Delete NS ${ns_name}
119 Run Keyword If Any Tests Failed Delete NSD ${nsd_name}
121 Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name}