9d1b3e918d4ec26b6052a45b9b7728451c4b0807
[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: vf-model-create
17 description: Create Virtual function from Vendor Software Product
18
19 info:
20   product: onap-elalto
21   service: sdc.catalog
22   author: ONAP HPA 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: false
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
57 results:
58   direction: portrait
59   attributes:
60     - name: id
61       description: VF ID
62       scope: short
63       type: string
64     - name: uuid
65       description: VF UUID
66       scope: short
67       type: string
68     - name: inputs
69       description: VNF Input ids
70       scope: short
71       type: string
72 http:
73   service:
74     name: sdc
75     version: v1.0
76     auth: basic
77     mode: direct
78   request:
79     uri: /sdc2/rest/v1/catalog/resources
80     method: POST
81     body: '{"contactId": "${host-username}", "vendorRelease": "1.0", "requirements": {}, "artifacts": {}, "capabilities": {}, "componentInstancesProperties": {}, "deploymentArtifacts": {}, "icon": "defaulticon", "vendorName": "${vendor-name}", "description": "${description}", "tags": ["CLI", "${name}"], "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": []}'
82     context:
83       remove_empty_node: true
84   success_codes:
85     - 201
86   result_map:
87     id: $b{$.uniqueId}
88     uuid: $b{$.uuid}
89     inputs: $b{$.inputs.[*].uniqueId}