AAI subscription type list cli schema 67/93167/2
authorshashikanth.vh <shashikanth.vh@huawei.com>
Fri, 9 Aug 2019 09:17:18 +0000 (14:47 +0530)
committerShashikanth VH <shashikanth.vh@huawei.com>
Fri, 9 Aug 2019 12:45:01 +0000 (12:45 +0000)
Issue-ID: CLI-197
Change-Id: I2310c280dfd23b208f8c8ad92deb2aaedbc01371
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml [new file with mode: 0644]

diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml
new file mode 100644 (file)
index 0000000..f1f5a60
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: subscription-list
+description: Lists the subscription for a given customer in Onap
+
+info:
+  product: onap-elalto
+  service: aai
+  author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+  - name: customer-name
+    description: Onap customer name
+    type: string
+    short_option: x
+    long_option: customer-name
+    is_optional: false
+
+results:
+  direction: portrait
+  attributes:
+    - name: service-type
+      description: Onap service type
+      scope: short
+      type: string
+    - name: resource-version
+      description: Onap subscription resource version
+      scope: short
+      type: string
+    - name: tenant
+      description: Onap tenant name
+      scope: long
+      type: string
+    - name: region
+      description: Onap region name
+      scope: long
+      type: string
+    - name: cloud
+      description: Onap cloud name
+      scope: long
+      type: string
+http:
+  service:
+    auth: basic
+    mode: direct
+  request:
+    uri: /aai/v16/business/customers/customer/${customer-name}/service-subscriptions
+    method: GET
+  success_codes:
+    - 200
+    - 404
+  result_map:
+    service-type: $b{$.service-subscription.[*].service-type}
+    resource-version: $b{$.service-subscription.[*].resource-version}
+    tenant: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'tenant.tenant-id')].relationship-value}
+    region: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-region-id')].relationship-value}
+    cloud: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-owner')].relationship-value}
+
+  sample_response:
+    body: '{"service-subscription":[{"service-type":"vTest","resource-version":"1504091375183","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"/aai/v16/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"}]}]}}]}'
+
+
+
+
+