1 # Copyright 2019 Huawei Technologies Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain 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,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 open_cli_schema_version: 1.0
16 name: vnf-tosca-provision
18 ONAP TOSCA VNF validation using ONAP CLI and Open Command Platform (OCOMP)
19 NOTE: Before using this command, configure the $OPEN_CLI_HOME/conf/vnf-tosca-provision.json
21 This command runs in 4 mode:
22 1. setup: Create requires Vendor, Service Subscription and VNF cloud in ONAP
23 2. standup: From the given VSP csar, VNF csar and NS csar, it creates VF Model, NS Model and NS service
24 3. cleanup: Remove those entries provided in onap-objects parameter
25 4. validate: Run setup -> standup -> cleanup
27 On every execution, it reports the ONAP managed object's ids in result onap-objects attribute. so
28 if requires, these attribute value could be passed in input parameter onap-objects on subsequent
29 executions to avoid recreation of these ONA managed objects
33 service: vnf-validation
34 author: ONAP VTP Team onap-discuss@lists.onap.org
38 description: Configuration file path
41 long_option: config-json
42 default_value: $s{env:OPEN_CLI_HOME}/conf/vnf-tosca-provision.json
45 description: Path to the ONAP vendor service product (VSP) for the VNF to provision
51 description: Path to the TOSCA CSAR for the VNF to provision
57 description: Path to the TOSCA CSAR for the NS service to provision
64 description: VNFM driver to use. One of gvnfmdriver or hwvnfmdriver
67 long_option: vnfm-driver
70 description: Existing ONAP object ids to use instead of creating them while running this task
73 long_option: onap-objects
77 description: setup or standup or cleanup
82 default_value: validate
89 - name: vnf-vendor-name
90 description: VNF Vendor Name
93 long_option: vnf-vendor-name
99 description: ONAP VNF instance id
103 description: Onap VNF status
107 description: Onap NS service instance id
111 description: Onap NS status
115 description: VNFM driver used
119 description: ONAP object used
122 - name: vnf-vendor-name
123 description: VNF Vendor Name
127 description: VNF Name
132 - python $s{env:OPEN_CLI_HOME}/script/vnf-tosca-provision.py --vendor-name ${vnf-vendor-name} --vnf-name ${vnf-name} --mode ${mode} --result-json $s{tmp:result.json:onap-objects} --conf ${config-json} --vsp ${vsp} --vnf-csar ${vnf-csar} --ns-csar ${ns-csar} --vnfm-driver ${vnfm-driver}
136 output: $s{tmp:result.json}
139 vnf-status: $o{$.vnf_status}
140 ns-id: $o{$.ns_instance_id}
141 ns-status: $o{$.ns_instance_status}
142 vnfm-driver: ${vnfm-driver}
143 vnf-name: ${vnf-name}
144 vnf-vendor-name: ${vnf-vendor-name}