f719f6e632a69a9114871d99bb34aa8e9cfa67c9
[cli.git] / products / onap-beijing / features / aai / src / main / resources / open-cli-schema / search / generic-search-schema.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: aai-generic-search
17 description: generic-search
18 #sample:  https://172.19.44.123:8443/aai/v11/search/generic-query?key=customer.global-customer-id:Orange&include=all&start-node-type=customer&depth=6
19
20 info:
21   product: onap-beijing
22   service: aai
23   author: ONAP CLI Team onap-discuss@lists.onap.org
24
25 parameters:
26   - name: key
27     description: key
28     type: string
29     short_option: k
30     long_option: key
31     is_optional: false
32   - name: value
33     description: value
34     type: string
35     short_option: z
36     long_option: value
37     is_optional: false
38   - name: start-node-type
39     description: start-node-type
40     type: string
41     short_option: r
42     long_option: start-node-type
43     is_optional: false
44   - name: depth
45     description: search depth
46     type: digit
47     short_option: e
48     long_option: depth
49     is_optional: false
50 results:
51   direction: landscape
52   attributes:
53     - name: resource-type
54       description: Onap result-type
55       scope: short
56       type: string
57     - name: resource-link
58       description: Onap resource-link
59       scope: short
60       type: string
61
62 http:
63   service:
64     auth: basic
65     mode: direct
66   request:
67     uri: /aai/v11/search/generic-query?key=${key}:${value}&include=all&start-node-type=${start-node-type}&depth=${depth}
68     method: GET
69   success_codes:
70     - 200
71     - 201
72   result_map:
73     resource-type: $b{result-data.[*].resource-type}
74     resource-link: $b{result-data.[*].resource-link}
75