200777156b331e41d0642f03be47e17dad40493b
[cli.git] /
1 # Copyright 2019 Huawei Technologies Co., Ltd.
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: sdc-consumer-create
17 description: Create SDC consumer
18
19 info:
20   product: onap-dublin
21   service: sdc
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: consumer-name
26     description: Consumer Name
27     type: string
28     short_option: x
29     long_option: consumer-name
30     is_optional: false
31   - name: consumer-password
32     description: Consumer password
33     type: string
34     short_option: y
35     long_option: consumer-password
36     is_optional: true
37     default_value: 7fa005e6e478ee677053a2c4a5c2f11190e2aa8be227a037291ea4cbc074ecb6
38   - name: salt
39     description: Salt
40     type: string
41     long_option: salt
42     short_option: c
43     is_optional: true
44     default_value: ab2987754f0c6293174865e86c47035d
45   - name: user-id
46     description: Designer user id
47     type: string
48     long_option: user-id
49     short_option: e
50     default_value: jh0003
51     is_optional: true
52 http:
53   service:
54     name: sdc
55     version: v1.0
56     auth: none
57     mode: direct
58   request:
59     uri: /sdc2/rest/v1/consumers
60     method: POST
61     headers:
62       USER_ID: ${user-id}
63     body: '{
64             "consumerName": "${consumer-name}",
65             "consumerSalt": "${salt}",
66             "consumerPassword": "${consumer-password}"
67            }'
68   success_codes:
69     - 200
70     - 201