20c71ec651fc04c8e3bf1f58fbb1f25e5219b03c
[cli.git] /
1 # Copyright 2019 Huawei Technologies Co., Ltd.
2 #
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
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15 open_cli_schema_version: 1.0
16 name: tosca-vnf-provision
17 description: |
18  Provision TOSCA based VNF using ONAP.
19  More details: https://wiki.lfnetworking.org/display/LN/TOSCA+VNF+Validation+Planning
20  NOTE: Before using this command, configure the $OPEN_CLI_HOME/conf/ovp-tosca-vnf-provision.json
21
22 info:
23   product: onap-dublin
24   service: vnf-validation
25   author: ONAP VTP Team onap-discuss@lists.onap.org
26
27 parameters:
28   - name: config-json
29     description: Configuration file path
30     type: string
31     short_option: x
32     long_option: config-json
33     default_value: $s{env:OPEN_CLI_HOME}/conf/ovp-tosca-vnf-provision.json
34     is_optional: false
35   - name: vsp
36     description: Path to the ONAP vendor service product (VSP) for the VNF to provision
37     type: binary
38     short_option: y
39     long_option: vsp
40     is_optional: false
41   - name: vnf-csar
42     description: Path to the TOSCA CSAR for the VNF to provision
43     type: binary
44     short_option: r
45     long_option: vnf-csar
46     is_optional: false
47   - name: ns-csar
48     description: Path to the TOSCA CSAR for the NS service to provision
49     type: binary
50     short_option: b
51     long_option: ns-csar
52     is_optional: true
53     default: false
54   - name: vnfm-driver
55     description: VNFM driver to use
56     type: string
57     short_option: c
58     long_option: vnfm-driver
59     is_optional: false
60
61 results:
62   direction: portrait
63   attributes:
64     - name: vnf-id
65       description: ONAP VNF instance id
66       scope: short
67       type: string
68     - name: vnf-status
69       description: Onap VNF status
70       scope: short
71       type: string
72     - name: ns-id
73       description: Onap NS service instance id
74       scope: short
75       type: string
76     - name: ns-status
77       description: Onap NS status
78       scope: short
79       type: string
80     - name: vnfm-driver
81       description: VNFM driver used
82       type: string
83       scope: short
84 cmd:
85   command:
86     -  python $s{env:OPEN_CLI_HOME}/script/ovp-tosca-vnf-provision.py --result-json $s{tmp:result.json} --config-json ${config-json} --vsp ${vsp} --vnf-csar ${vnf-csar} --ns-csar ${ns-csar} --vnfm-driver ${vnfm-driver}
87   success_codes:
88     - 0
89   working_directory: .
90   output: $s{tmp:result.json}
91   result_map:
92     vnf-id: $o{$.vnf_id}
93     vnf-status: $o{$.vnf_status}
94     ns-id: $o{$.ns_id}
95     ns-status: $o{$.ns_status}
96     vnfm-driver: ${vnfm-driver}