06b4c4fbd64c861dd869b1cdf708d5d809f4ab97
[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-dublin
21   service: sdc
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24
25 parameters:
26   - name: service-model-id
27     description: Onap Service Name
28     type: string
29     short_option: x
30     long_option: service-model-id
31     is_optional: false
32   - name: vf-uniqueId
33     description: VF Unique ID
34     type: string
35     short_option: y
36     long_option: vf-uniqueId
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 http:
63   service:
64     name: sdc
65     version: v1.0
66     auth: basic
67     mode: direct
68   request:
69     uri: /sdc2/rest/v1/catalog/services/${service-model-id}/resourceInstance
70     method: POST
71     body: '{"name": "${vf-name}", "componentVersion": "${vf-version}", "posY": 248, "posX": 406, "uniqueId": "${service-model-id}-${vf-uniqueId}", "originType": "VF", "componentUid": "${vf-uniqueId}", "icon": "defaulticon"}'
72   success_codes:
73     - 201
74   result_map:
75     ID: $b{$.uniqueId}
76     UUID: $b{$.componentUid}