4bb1bf981ed16925520392476dabf9233c48808d
[cli.git] /
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: microservice-show
17 description: Details the registered microservice in Onap
18
19 info:
20   product: onap-casablanca
21   service: msb
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: service-name
26     description: Onap service name
27     type: string
28     short_option: x
29     long_option: service-name
30     is_optional: false
31   - name: service-version
32     description: Onap service version
33     type: string
34     short_option: y
35     long_option: service-version
36     is_optional: false
37 results:
38   direction: portrait
39   attributes:
40     - name: name
41       description: Onap service name
42       scope: short
43       type: string
44     - name: version
45       description: Onap service version
46       scope: short
47       type: string
48     - name: url
49       description: Onap service base url
50       scope: short
51       type: url
52     - name: status
53       description: Onap service status
54       scope: short
55       type: digit
56     - name: nodes
57       description: Onap service running nodes
58       scope: long
59       type: json
60     - name: enable-ssl
61       description: Onap service is enabled with https or not
62       scope: long
63       type: string
64     - name: path
65       description: Onap service path
66       scope: long
67       type: string
68 http:
69   service:
70     auth: none
71     mode: direct
72   request:
73     uri: /api/microservices/v1/services/${service-name}/version/${service-version}
74     method: GET
75   success_codes:
76     - 201
77     - 200
78   result_map:
79     name: $b{$.serviceName}
80     version: $b{$.version}
81     url: $b{$.url}
82     status: $b{$.status}
83     enable-ssl: $b{$.enable_ssl}
84     path: $b{$.path}
85     nodes: $b{$.nodes[*].ip}:$b{$.nodes[*].port}
86   sample_response:
87     body: '{"serviceName":"test","version":"v1","url":"/api/test/v1","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"127.0.0.1","port":"8012","ttl":0,"nodeId":"test_127.0.0.1_8012","expiration":"2017-02-10T05:33:25Z","created_at":"2017-02-10T05:33:25Z","updated_at":"2017-02-10T05:33:25Z"}],"status":"1"}'
88
89
90
91