1 # Copyright © Intel Corporation 2019
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 open_cli_schema_version: 1.0
16 name: subscription-list
17 description: Lists the subscription for a given customer in Onap
22 author: ONAP CLI Team onap-discuss@lists.onap.org
26 description: Onap customer name
29 long_option: customer-name
36 description: Onap service type
39 - name: resource-version
40 description: Onap subscription resource version
44 description: Onap tenant name
48 description: Onap region name
52 description: Onap cloud name
60 uri: /aai/v13/business/customers/customer/${customer-name}/service-subscriptions
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}
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"}]}]}}]}'