f7634e5368fd983456ae069616ad2f62f12091ec
[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: service-model-add-vf
17 description: Helps to add VF into service models in SDC
18
19 info:
20   product: onap-elalto
21   service: sdc.catalog
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24
25 parameters:
26   - name: service-id
27     description: Onap Service Name
28     type: string
29     short_option: x
30     long_option: service-id
31     is_optional: false
32   - name: vf-id
33     description: VF Unique ID
34     type: string
35     short_option: y
36     long_option: vf-id
37     is_optional: true
38   - name: vf-name
39     description: VF Name
40     type: string
41     short_option: z
42     long_option: vf-name
43     is_optional: true
44   - name: vf-version
45     description: VF version
46     type: string
47     long_option: vf-version
48     short_option: b
49     is_optional: true
50
51 results:
52   direction: portrait
53   attributes:
54     - name: id
55       description: Service ID
56       scope: short
57       type: string
58     - name: uuid
59       description: Service UUID
60       scope: short
61       type: string
62     - name: inputs
63       description: VNF Input ids
64       scope: short
65       type: string
66 http:
67   service:
68     name: sdc
69     version: v1.0
70     auth: basic
71     mode: direct
72   request:
73     uri: /sdc2/rest/v1/catalog/services/${service-id}/resourceInstance
74     method: POST
75     body: '{"name": "${vf-name}", "componentVersion": "${vf-version}", "posY": 248, "posX": 406, "uniqueId": "${service-id}-${vf-id}", "originType": "VF", "componentUid": "${vf-id}", "icon": "defaulticon"}'
76   success_codes:
77     - 201
78   result_map:
79     id: $b{$.uniqueId}
80     uuid: $b{$.componentUid}
81     inputs: $b{$.inputs.[*].uniqueId}