858dee8e1495f9225cab92c244c994869e4ee1a9
[cli.git] /
1 # Copyright 2018 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: vf-model-create
17 description: Create Virtual function from Vendor Software Product
18
19 info:
20   product: onap-beijing
21   service: sdc
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24
25 parameters:
26   - name: name
27     description: Onap VF Name
28     type: string
29     short_option: x
30     long_option: name
31     is_optional: false
32   - name: description
33     description: Description for VF
34     type: string
35     short_option: y
36     long_option: description
37     is_optional: true
38   - name: vendor-name
39     description: Vendor name
40     type: string
41     long_option: vendor-name
42     short_option: z
43     is_optional: true
44   - name: vsp-id
45     description: VSP ID
46     type: string
47     long_option: vsp-id
48     short_option: b
49     is_optional: true
50   - name: vsp-version
51     description: VSP version
52     type: string
53     long_option: vsp-version
54     short_option: g
55     is_optional: true
56 results:
57   direction: portrait
58   attributes:
59     - name: ID
60       description: VF ID
61       scope: short
62       type: string
63 http:
64   service:
65     name: sdc
66     version: v1.0
67     auth: basic
68     mode: direct
69   request:
70     uri: /sdc2/rest/v1/catalog/resources
71     method: POST
72     body: '{"contactId": "${onap-username}", "vendorRelease": "1.0", "requirements": {}, "artifacts": {}, "capabilities": {}, "componentInstancesProperties": {}, "deploymentArtifacts": {}, "icon": "defaulticon", "vendorName": "${vendor-name}", "description": "${description}", "tags": ["CLI", "${name}"], "groups": [], "properties": [], "categories": [{"subcategories": [{"normalizedName": "abstract", "name": "Abstract", "uniqueId": "resourceNewCategory.generic.abstract", "icons": ["database"]}], "normalizedName": "generic", "name": "Generic", "uniqueId": "resourceNewCategory.generic"}], "name": "${name}", "toscaArtifacts": {}, "csarUUID": "${vsp-id}", "resourceType": "VF", "csarVersion": "${vsp-version}", "componentType": "RESOURCE", "componentInstancesAttributes": {}, "attributes": [], "componentInstances": []}'
73   success_codes:
74     - 201
75   result_map:
76     ID: $b{$.uniqueId}
77