3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
17 # 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 18-Dec-2019
22 [Arguments] ${pkg_name}
23 ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns
24 ${ns_yaml}= Catenate SEPARATOR=_ ${pkg_name} nsd
25 ${ns_yaml}= Catenate SEPARATOR=. ${ns_yaml} yaml
26 ${nsd_path}= Join Path ${ns_pkg} ${ns_yaml}
27 ${rc} ${stdout}= Run and Return RC and Output osm package-create ns ${pkg_name}
28 Should Be Equal As Integers ${rc} ${success_return_code}
29 File Should Exist ${nsd_path}
33 Create OSM VNF Package
34 [Arguments] ${pkg_name}
35 ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf
36 ${vnf_yaml}= Catenate SEPARATOR=_ ${pkg_name} vnfd
37 ${vnf_yaml}= Catenate SEPARATOR=. ${vnf_yaml} yaml
38 ${vnfd_path}= Join Path ${vnf_pkg} ${vnf_yaml}
39 ${rc} ${stdout}= Run and Return RC and Output osm package-create vnf ${pkg_name}
40 Should Be Equal As Integers ${rc} ${success_return_code}
41 File Should Exist ${vnfd_path}
45 Validate OSM NS Package
46 [Arguments] ${pkg_name}
47 ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns
48 ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${ns_pkg}
49 Should Be Equal As Integers ${rc} ${success_return_code}
50 Verify Package Validation Result ${ns_pkg}
54 Validate OSM VNF Package
55 [Arguments] ${pkg_name}
56 ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf
57 ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${vnf_pkg}
58 Should Be Equal As Integers ${rc} ${success_return_code}
59 Verify Package Validation Result ${vnf_pkg}
63 Verify Package Validation Result
65 ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${pkg} | awk 'NR==6{print $6}'
66 Should Be Equal As Integers ${rc} ${success_return_code}
67 Should Not Contain ${stdout} ERROR
72 [Arguments] ${pkg_name}
73 ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf
74 ${vnf_pkg_tar}= Catenate SEPARATOR=. ${vnf_pkg} tar gz
75 ${rc} ${stdout}= Run and Return RC and Output osm package-build ${vnf_pkg}
76 Should Be Equal As Integers ${rc} ${success_return_code}
77 File Should Exist ${vnf_pkg_tar}
82 [Arguments] ${pkg_name}
83 ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns
84 ${ns_pkg_tar}= Catenate SEPARATOR=. ${ns_pkg} tar gz
85 ${rc} ${stdout}= Run and Return RC and Output osm package-build ${ns_pkg}
86 Should Be Equal As Integers ${rc} ${success_return_code}
87 File Should Exist ${ns_pkg_tar}