84c678201fabcc44a136118241d815e521bd23de
[cli.git] /
1 # Copyright © Intel Corporation 2019
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: vsp-create
17 description: Create Vendor Software Product
18
19 info:
20   product: onap-dublin
21   service: sdc
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: vsp-name
26     description: Onap VSP Name
27     type: string
28     short_option: x
29     long_option: vsp-name
30     is_optional: false
31   - name: vsp-description
32     description: Description for VSP
33     type: string
34     short_option: y
35     long_option: vsp-description
36     is_optional: true
37   - name: vsp-category
38     description: Category of the VSP
39     type: string
40     long_option: vsp-category
41     short_option: z
42     is_optional: true
43     default_value: resourceNewCategory.generic
44   - name: vsp-subcategory
45     description: Sub Category of VSP
46     type: string
47     long_option: vsp-subcategory
48     short_option: b
49     is_optional: true
50     default_value: resourceNewCategory.generic.abstract
51   - name: vlm-version
52     description: License version
53     type: string
54     long_option: vlm-version
55     short_option: c
56     is_optional: true
57     default_value: 1.0
58   - name: vlm-vendor
59     description: License Model vendor
60     type: string
61     long_option: vlm-vendor
62     short_option: e
63     is_optional: false
64   - name: vlm-id
65     description: License Model ID
66     type: string
67     long_option: vlm-id
68     short_option: g
69     is_optional: false
70   - name: vlm-agreement-id
71     description: License Agreement ID
72     type: string
73     long_option: vlm-agreement-id
74     short_option: i
75     is_optional: false
76   - name: vlm-feature-group-id
77     description: Feature Group ID
78     type: string
79     long_option: vlm-feature-group-id
80     short_option: j
81     is_optional: false
82 results:
83   direction: portrait
84   attributes:
85     - name: ID
86       description: VSP ID
87       scope: short
88       type: string
89     - name: version
90       description: VSP Model version
91       scope: short
92       type: uuid
93 http:
94   service:
95     name: sdc
96     version: v1.0
97     auth: basic
98     mode: direct
99   request:
100     uri: /onboarding-api/v1.0/vendor-software-products
101     method: POST
102     body: '{"category": "${vsp-category}", "vendorId": "${vlm-id}", "subCategory": "${vsp-subcategory}", "description": "${vsp-description}", "licensingVersion": "${vlm-version}", "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"}, "icon": "icon", "onboardingMethod": "Manual", "vendorName": "${vlm-vendor}", "name": "${vsp-name}"}'
103   success_codes:
104     - 200
105   result_map:
106     ID: $b{$.vspId}
107     version: $b{$.version.id}