Merge "catalog module for onap-dublin cli product"
[cli.git] / products / onap-dublin / features / aai / src / main / resources / open-cli-schema / business / subscription / subscription-list-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: subscription-list
17 description: Lists the subscription for a given customer in Onap
18
19 info:
20   product: onap-dublin
21   service: aai
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: customer-name
26     description: Onap customer name
27     type: string
28     short_option: x
29     long_option: customer-name
30     is_optional: false
31
32 results:
33   direction: landscape
34   attributes:
35     - name: service-type
36       description: Onap service type
37       scope: short
38       type: string
39     - name: resource-version
40       description: Onap subscription resource version
41       scope: short
42       type: string
43     - name: tenant
44       description: Onap tenant name
45       scope: long
46       type: string
47     - name: region
48       description: Onap region name
49       scope: long
50       type: string
51     - name: cloud
52       description: Onap cloud name
53       scope: long
54       type: string
55 http:
56   service:
57     auth: basic
58     mode: direct
59   request:
60     uri: /aai/v13/business/customers/customer/${customer-name}/service-subscriptions
61     method: GET
62   success_codes:
63     - 200
64     - 404
65   result_map:
66     service-type: $b{$.service-subscription.[*].service-type}
67     resource-version: $b{$.service-subscription.[*].resource-version}
68     tenant: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'tenant.tenant-id')].relationship-value}
69     region: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-region-id')].relationship-value}
70     cloud: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-owner')].relationship-value}
71
72   sample_response:
73     body: '{"service-subscription":[{"service-type":"vTest","resource-version":"1504091375183","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/26ab7af6-96cc-4c4e-814a-e533af4ef9f6","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"att-aic"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"AAIAIC25"},{"relationship-key":"tenant.tenant-id","relationship-value":"26ab7af6-96cc-4c4e-814a-e533af4ef9f6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"test"}]}]}}]}'
74
75
76
77