summaryrefslogtreecommitdiffstats
path: root/products
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-28 10:44:30 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-28 10:44:30 +0530
commita9a1e7a9d42f88aab98bad772c8be33cfec47946 (patch)
tree844eae0b0eeaba5d68fb430e52511ee5262413b7 /products
parent4f273e8b2d8a54f133988d2783ba66de7c810540 (diff)
Casablanca: AAI subscription-list
Issue-ID: CLI-122 Change-Id: Id2d810cc6e1d3e19b2888166c480b0f4c7bc8191 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'products')
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-moco.json23
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-sample.yaml14
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-casablanca.yaml77
3 files changed, 114 insertions, 0 deletions
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-moco.json b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-moco.json
new file mode 100644
index 00000000..8dcf7a24
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-moco.json
@@ -0,0 +1,23 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v13/business/customers/customer/mrkanag/service-subscriptions",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-aa70d08c-0e55-422a-be1e-eede28708f70",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "service-subscription" : [ {
+ "service-type" : "vfw-in",
+ "resource-version" : "1538111525606"
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-sample.yaml b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..7303ca23
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/subscription/subscription-list-schema-casablanca-sample.yaml
@@ -0,0 +1,14 @@
+open_cli_sample_version: 1.0
+name: subscription-list
+version: onap-casablanca
+samples:
+ sample1:
+ name: subscription-list
+ input: --customer-name mrkanag
+ moco: subscription-list-schema-casablanca-moco.json
+ output: |
+ +--------------+------------------+
+ |service-type |resource-version |
+ +--------------+------------------+
+ |vfw-in |1538111525606 |
+ +--------------+------------------+
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-casablanca.yaml b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-casablanca.yaml
new file mode 100644
index 00000000..d04077d9
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-casablanca.yaml
@@ -0,0 +1,77 @@
+# Copyright 2018 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-casablanca
+ 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: landscape
+ 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/v13/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/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"}]}]}}]}'
+
+
+
+