5a542ba26098c710c100de18db74fc8daaa27c85
[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-dublin
21   service: sdc
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: false
50   - name: vsp-version
51     description: VSP version
52     type: string
53     long_option: vsp-version
54     short_option: g
55     is_optional: false
56
57 results:
58   direction: portrait
59   attributes:
60     - name: ID
61       description: VF ID
62       scope: short
63       type: string
64 http:
65   service:
66     name: sdc
67     version: v1.0
68     auth: basic
69     mode: direct
70   request:
71     uri: /sdc2/rest/v1/catalog/resources
72     method: POST
73     body: '{
74            "artifacts":{},
75            "toscaArtifacts":{},
76            "contactId":"${host-username}",
77            "categories":[{
78                "name":"Generic",
79                "normalizedName":"generic",
80                "uniqueId":"resourceNewCategory.generic",
81                "icons": null,
82                "subcategories":[{
83                    "name":"Abstract",
84                    "normalizedName":"abstract",
85                    "uniqueId":"resourceNewCategory.generic.abstract",
86                    "groupings":null,
87                    "version":null,
88                    "ownerId":null,
89                    "icons":["abstract"],
90                    "empty":false,
91                    "type":null }],
92             "version":null,
93             "ownerId":null,
94             "empty":false,
95             "type":null }],
96             "description":"${description}",
97             "icon":"defaulticon",
98             "componentInstancesProperties":{},
99             "componentInstancesAttributes":{},
100             "name":"${name}",
101             "tags":["${name}"],
102             "capabilities":{},
103             "requirements":{},
104             "deploymentArtifacts":{},
105             "componentType":"RESOURCE",
106             "vendorName":"${vendor-name}",
107             "vendorRelease":"1.0",
108             "componentInstances":[],
109             "properties":[],
110             "attributes":[],
111             "resourceType":"VF",
112             "csarUUID":"${vsp-id}",
113             "csarVersion":"1.0"
114            }'
115   success_codes:
116     - 201
117   result_map:
118     ID: $b{$.uniqueId}