Add VSP commit
[cli.git] / products / onap-dublin / features / sdc / src / main / resources / open-cli-schema / vsp / vsp-create-schema-dublin.yaml
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.onboarding
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     default_value: NetworkPackage
75
76 results:
77   direction: portrait
78   attributes:
79     - name: id
80       description: VSP ID
81       scope: short
82       type: string
83     - name: version
84       description: VSP Model version
85       scope: short
86       type: string
87     - name: version-id
88       description: VSP Model version id
89       scope: short
90       type: uuid
91 http:
92   service:
93     name: sdc
94     version: v1.0
95     auth: basic
96     mode: direct
97   request:
98     uri: /onboarding-api/v1.0/vendor-software-products
99     method: POST
100     body: '{
101             "category": "resourceNewCategory.generic",
102             "vendorId": "${vlm-id}",
103             "subCategory": "resourceNewCategory.generic.network elements",
104             "description": "${vsp-description}",
105             "licensingVersion": "${vlm-version}",
106             "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"},
107             "icon": "icon",
108             "onboardingMethod": "${onboarding-method}",
109             "vendorName": "${vlm-vendor}",
110             "name": "${vsp-name}"
111            }'
112   success_codes:
113     - 200
114   result_map:
115     id: $b{$.itemId}
116     version: $b{$.version.name}
117     version-id: $b{$.version.id}