Update tags in all testsuites
[osm/tests.git] / robot-systest / testsuite / epa_04-epa_underlay_sriov.robot
1 #   Licensed under the Apache License, Version 2.0 (the "License");\r
2 #   you may not use this file except in compliance with the License.\r
3 #   You may obtain a copy of the License at\r
4 #\r
5 #       http://www.apache.org/licenses/LICENSE-2.0\r
6 #\r
7 #   Unless required by applicable law or agreed to in writing, software\r
8 #   distributed under the License is distributed on an "AS IS" BASIS,\r
9 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
10 #   See the License for the specific language governing permissions and\r
11 #   limitations under the License.\r
12 \r
13 *** Settings ***\r
14 Documentation     [EPA-04] EPA underlay SR-IOV.\r
15 \r
16 Library   OperatingSystem\r
17 Library   String\r
18 Library   Collections\r
19 Library   SSHLibrary\r
20 \r
21 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot\r
22 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vnf_lib.robot\r
23 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot\r
24 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot\r
25 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot\r
26 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot\r
27 \r
28 Variables   %{ROBOT_DEVOPS_FOLDER}/resources/epa_04-epa_underlay_sriov.py\r
29 \r
30 Force Tags   epa_04   cluster_epa   daily   regression\r
31 \r
32 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup\r
33 \r
34 \r
35 *** Variables ***\r
36 ${vnf_member_index_1}   1\r
37 ${vnf_member_index_2}   2\r
38 ${username}   ubuntu\r
39 ${password}   osm4u\r
40 ${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}"}]} ] }\r
41 ${success_return_code}   0\r
42 \r
43 \r
44 *** Test Cases ***\r
45 Create VNF Descriptor\r
46 \r
47     Remove Environment Variable  OVERRIDES\r
48     Create VNFD  '%{PACKAGES_FOLDER}/${vnfd_pkg}'\r
49 \r
50 \r
51 Create NS Descriptor\r
52 \r
53     Create NSD  '%{PACKAGES_FOLDER}/${nsd_pkg}'\r
54 \r
55 \r
56 Instantiate Network Service\r
57 \r
58     ${id}=  Create Network Service  ${nsd_name}  %{VIM_TARGET}  ${ns_name}  ${ns_config}  ${publickey}\r
59     Set Suite Variable  ${ns_id}  ${id}\r
60 \r
61 \r
62 Get Management Ip Addresses\r
63 \r
64     Variable Should Exist  ${ns_id}  msg=Network service instance is not available\r
65     ${ip}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_1}\r
66     Set Suite Variable  ${ip_mgmt_1}  ${ip}\r
67     log  ${ip_mgmt_1}\r
68 \r
69     ${ip}  Get Vnf Management Ip Address  ${ns_id}  ${vnf_member_index_2}\r
70     Set Suite Variable  ${ip_mgmt_2}  ${ip}\r
71     log  ${ip_mgmt_2}\r
72 \r
73 \r
74 Ping from Vnf1 to Vnf2\r
75 \r
76     Variable Should Exist  ${ip_mgmt_1}  msg=IP address of the data VNF '${vnf_member_index_1}' is not available\r
77     Variable Should Exist  ${privatekey}  msg=SSH private key not available\r
78     Sleep   30 seconds   Wait for SSH daemon to be up\r
79     ${stdout}=   Execute Remote Command Check Rc Return Output   ${ip_mgmt_1}   ${username}   ${password}   ${privatekey}   ip addr ; ping -c 5 ${datanet_ip2}\r
80     log  ${stdout}\r
81 \r
82 \r
83 Ping from Vnf2 to Vnf1\r
84 \r
85     Variable Should Exist  ${ip_mgmt_2}  msg=IP address of the data VNF '${vnf_member_index_2}' is not available\r
86     Variable Should Exist  ${privatekey}  msg=SSH private key not available\r
87     ${stdout}=   Execute Remote Command Check Rc Return Output   ${ip_mgmt_2}   ${username}   ${password}   ${privatekey}   ip addr ; ping -c 5 ${datanet_ip1}\r
88     log  ${stdout}\r
89 \r
90 \r
91 Delete NS Instance\r
92     [Tags]   cleanup\r
93 \r
94     Delete NS  ${ns_name}\r
95 \r
96 \r
97 Delete NS Descriptor\r
98     [Tags]   cleanup\r
99 \r
100     Delete NSD  ${nsd_name}\r
101 \r
102 \r
103 Delete VNF Descriptor\r
104     [Tags]   cleanup\r
105 \r
106     Delete VNFD  ${vnfd_name}\r
107 \r
108 \r
109 \r
110 *** Keywords ***\r
111 Suite Cleanup\r
112     [Documentation]  Test Suite Cleanup: Deleting descriptors and NS instance\r
113 \r
114     Run Keyword If Any Tests Failed  Delete NS  ${ns_name}\r
115 \r
116     Run Keyword If Any Tests Failed  Delete NSD  ${nsd_name}\r
117 \r
118     Run Keyword If Any Tests Failed  Delete VNFD  ${vnfd_name}\r
119 \r