6a7c1e8132625cea8c9dc804a3a61f15f88e27ad
[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
21 info:
22   product: onap-dublin
23   service: vnf-validation
24   author: ONAP VTP Team onap-discuss@lists.onap.org
25
26 parameters:
27   - name: config-json
28     description: Configuration file path
29     type: string
30     short_option: x
31     long_option: config-json
32     default_value: $s{env:OPEN_CLI_HOME}/conf/ovp-tosca-vnf-provision.json
33     is_optional: false
34   - name: vsp
35     description: Path to the ONAP vendor service product (VSP) for the VNF to provision
36     type: binary
37     short_option: y
38     long_option: vsp
39     is_optional: false
40   - name: vnf-csar
41     description: Path to the TOSCA CSAR for the VNF to provision
42     type: binary
43     short_option: r
44     long_option: vnf-csar
45     is_optional: false
46   - name: ns-csar
47     description: Path to the TOSCA CSAR for the NS service to provision
48     type: binary
49     short_option: b
50     long_option: ns-csar
51     is_optional: true
52     default: false
53   - name: vnfm-driver
54     description: VNFM driver to use
55     type: string
56     short_option: c
57     long_option: vnfm-driver
58     is_optional: false
59
60 results:
61   direction: portrait
62   attributes:
63     - name: vnf-id
64       description: ONAP VNF instance id
65       scope: short
66       type: string
67     - name: vnf-status
68       description: Onap VNF status
69       scope: short
70       type: string
71     - name: ns-id
72       description: Onap NS service instance id
73       scope: short
74       type: string
75     - name: ns-status
76       description: Onap NS status
77       scope: short
78       type: string
79     - name: vnfm-driver
80       description: VNFM driver used
81       type: string
82       scope: short
83 cmd:
84   command:
85     -  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}
86   success_codes:
87     - 0
88   working_directory: .
89   output: $s{tmp:result.json}
90   result_map:
91     vnf-id: $o{$.vnf_id}
92     vnf-status: $o{$.vnf_status}
93     ns-id: $o{$.ns_id}
94     ns-status: $o{$.ns_status}
95     vnfm-driver: ${vnfm-driver}