19c92393fcc3f41430dcd9c6d60fadba17016183
[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: vlm-version
38     description: License version
39     type: string
40     long_option: vlm-version
41     short_option: c
42     is_optional: true
43     default_value: 1.0
44   - name: vlm-vendor
45     description: License Model vendor
46     type: string
47     long_option: vlm-vendor
48     short_option: e
49     is_optional: false
50   - name: vlm-id
51     description: License Model ID
52     type: string
53     long_option: vlm-id
54     short_option: g
55     is_optional: false
56   - name: vlm-agreement-id
57     description: License Agreement ID
58     type: string
59     long_option: vlm-agreement-id
60     short_option: i
61     is_optional: false
62   - name: vlm-feature-group-id
63     description: Feature Group ID
64     type: string
65     long_option: vlm-feature-group-id
66     short_option: j
67     is_optional: false
68   - name: onboarding-method
69     description: Method to be used for onboarding (Manual or NetworkPackage)
70     type: string
71     long_option: onboarding-method
72     short_option: o
73     is_optional: false
74
75 results:
76   direction: portrait
77   attributes:
78     - name: ID
79       description: VSP ID
80       scope: short
81       type: string
82     - name: version
83       description: VSP Model version
84       scope: short
85       type: uuid
86 http:
87   service:
88     name: sdc
89     version: v1.0
90     auth: basic
91     mode: direct
92   request:
93     uri: /onboarding-api/v1.0/vendor-software-products
94     method: POST
95     body: '{
96             "category": "resourceNewCategory.generic",
97             "vendorId": "${vlm-id}",
98             "subCategory": "resourceNewCategory.generic.abstract",
99             "description": "${vsp-description}",
100             "licensingVersion": "${vlm-version}",
101             "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"},
102             "icon": "icon",
103             "onboardingMethod": "${onboarding-method}",
104             "vendorName": "${vlm-vendor}",
105             "name": "${vsp-name}"
106            }'
107   success_codes:
108     - 200
109   result_map:
110     ID: $b{$.itemId}
111     version: $b{$.version.id}