License: Add header
[cli.git] / profiles / http / src / test / resources / open-cli-schema / sample-test1-schema-http.yaml
1 # Copyright 2018 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: sample-test1
17 description: Oclip sample command to test the command features
18
19 info:
20   product: open-cli
21   service: test
22   type: cmd
23   author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
24
25 parameters:
26   - name: bool-param
27     type: bool
28     description: Oclip boolean param, by default its always false.
29     short_option: b
30     long_option: bool
31     is_optional: true
32     default_value: false
33   - name: secure-param
34     type: string
35     description: Oclip secure param such as password
36     short_option: x
37     long_option: secure
38     is_secured: true
39     is_optional: false
40     default_Value: pass123#
41   - name: string-param
42     type: string
43     description: Oclip string param
44     long_option: string-param
45     short_option: c
46     is_optional: false
47     default_Value: test
48   - name: yaml-param
49     type: json
50     description: Oclip yaml file location param
51     long_option: yaml-param
52     short_option: y
53     is_optional: false
54   - name: json-param
55     type: json
56     description: Oclip json file location param
57     long_option: json-param
58     short_option: j
59     is_optional: false
60   - name: long-param
61     type: digit
62     description: Oclip long param
63     short_option: l
64     long_option: long-opt
65     is_optional: false
66     default_value: 10
67   - name: url-param
68     type: url
69     description: Oclip url param
70     short_option: r
71     long_option: url
72     is_optional: false
73     default_value: http://localhost:8082/file.txt
74   - name: env-param
75     type: string
76     description: Oclip env param.
77     short_option: z
78     long_option: env
79     is_optional: false
80     default_value: ${ENV_VAR}
81   - name: positional-args
82     type: string
83     description: Oclip positional args, if no short option and no long option given for it
84     is_optional: false
85     default_value: http://localhost:8082/file.txt
86 http:
87   request:
88     uri: /vims
89     method: POST
90     body: '{"name":"${name}","vendor":"${vendor}","version":"${vim-version}","description":"${description}","type":"${type}","url":"${url}","userName":"${username}","password":"${password}","domain":"${domain}","tenant":"${tenant}"}'
91     headers:
92     context:
93       remove_empty_node: true
94   success_codes:
95     - 201
96     - 200
97   result_map:
98     id: $b{$.vimId}
99     name: $b{$.name}
100     vendor: $b{$.vendor}
101     type: $b{$.type}
102     version: $b{$.version}
103     url: $b{$.url}
104     description: $b{$.description}
105     username: $b{$.userName}
106     password: $b{$.password}
107     domain: $b{$.domain}
108     tenant: $b{$.tenant}
109     create-time: $b{$.createTime}
110   sample_response:
111     body:'{"id":"string","name":"string","vendor":"string","version":"string","description":"string","type":"string","createTime":"string","url":"string","userName":"string","password":"string","domain":"string","tenant":"string"}'