SDC service-model commands for onboarding
[cli.git] / products / onap-dublin / features / sdc / src / main / resources / open-cli-schema / service-model / service-model-add-vf-schema-dublin.yaml
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-id
33     description: VF ID
34     type: string
35     short_option: y
36     long_option: vf-id
37     is_optional: true
38   - name: vf-name
39     description: VF ID
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 http:
59   service:
60     name: sdc
61     version: v1.0
62     auth: basic
63     mode: direct
64   request:
65     uri: /sdc2/rest/v1/catalog/services/${service-model-id}/resourceInstance
66     method: POST
67     body: '{"name": "${vf-name}", "componentVersion": "${vf-version}", "posY": 248, "posX": 406, "uniqueId": "${service-model-id}-${vf-id}", "originType": "VF", "componentUid": "${vf-id}", "icon": "defaulticon"}'
68   success_codes:
69     - 201
70   result_map:
71     ID: $b{$.uniqueId}