summaryrefslogtreecommitdiffstats
path: root/products/onap-casablanca/features
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-28 10:02:21 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-28 10:02:21 +0530
commitd7d205a9bd77d39c037b06431baea95d51f23ece (patch)
tree87b6d2f23361cc0e2ad03304c86f585451b54765 /products/onap-casablanca/features
parent0d4a732a87a7a03c859c26cbce50ab1b7974181d (diff)
Casablanca: AAI customer-delete
Issue-ID: CLI-122 Change-Id: I79f0507e21f12f78dc673a56af4f988e7ea519f4 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'products/onap-casablanca/features')
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-moco.json18
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-casablanca.yaml46
-rw-r--r--products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-casablanca.yaml2
4 files changed, 73 insertions, 2 deletions
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-moco.json b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-moco.json
new file mode 100644
index 00000000..5caefa73
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-moco.json
@@ -0,0 +1,18 @@
+[ {
+ "request" : {
+ "method" : "delete",
+ "uri" : "/aai/v13/business/customers/customer/mrkanag",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-491247e3-a6c7-4c4a-8af5-a98c85442307",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 204,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-sample.yaml b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..221f2a62
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-sample/customer/customer-delete-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: customer-delete
+version: onap-casablanca
+samples:
+ sample1:
+ name: customer-delete
+ input: --customer-id mrkanag --resource-version 1538105836430 -d
+ moco: customer-delete-schema-casablanca-moco.json
+ output: \ No newline at end of file
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-casablanca.yaml b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-casablanca.yaml
new file mode 100644
index 00000000..9ce03918
--- /dev/null
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-casablanca.yaml
@@ -0,0 +1,46 @@
+# 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: customer-delete
+description: Delete a customer from Onap
+
+info:
+ product: onap-casablanca
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-id
+ description: Onap customer id
+ type: string
+ short_option: x
+ long_option: customer-id
+ is_optional: false
+ - name: resource-version
+ description: Onap customer resource version
+ type: uuid
+ short_option: y
+ long_option: resource-version
+ is_optional: false
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/business/customers/customer/${customer-id}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-casablanca.yaml b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-casablanca.yaml
index c05ae119..a810fbd5 100644
--- a/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-casablanca.yaml
+++ b/products/onap-casablanca/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-casablanca.yaml
@@ -44,5 +44,3 @@ http:
result_map:
name: $b{customer.[*].global-customer-id}
resource-version: $b{customer.[*].resource-version}
- sample_response:
- body: '{"customer":[{"global-customer-id":"Demonstration","subscriber-name":"Demonstration","subscriber-type":"INFRA","resource-version":"1500729865","service-subscriptions":{"service-subscription":[{"service-type":"vFW","resource-version":"1500729865","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}},{"service-type":"vLB","resource-version":"1500729865","service-instances":{"service-instance":[{"service-instance-id":"d6167ea1-ff83-4236-9b32-37494dfb7537","service-instance-name":"demoVLB-1","persona-model-id":"af01a849-721b-407d-a880-be836e26ee81","persona-model-version":"1.0","resource-version":"1501154574","relationship-list":{"relationship":[{"related-to":"generic-vnf","related-link":"https://192.168.17.12:8443/aai/v8/network/generic-vnfs/generic-vnf/16c6d95d-44e3-4527-aa63-a495bf8e776e/","relationship-data":[{"relationship-key":"generic-vnf.vnf-id","relationship-value":"16c6d95d-44e3-4527-aa63-a495bf8e776e"}],"related-to-property":[{"property-key":"generic-vnf.vnf-name","property-value":"demoVLB-1-VNF-1"}]}]}}]},"relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}}]}},{"global-customer-id":"Linan","subscriber-name":"Linan","subscriber-type":"INFRA","resource-version":"1501768482","service-subscriptions":{"service-subscription":[{"service-type":"vFW","resource-version":"1501768482","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}},{"service-type":"vLB","resource-version":"1501768482","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}}]}},{"global-customer-id":"DemoCust_7151e36a-1a57-4993-b513-54134f2b8f19","subscriber-name":"DemoCust_7151e36a-1a57-4993-b513-54134f2b8f19","subscriber-type":"INFRA","resource-version":"1501766760","service-subscriptions":{"service-subscription":[{"service-type":"vFW","resource-version":"1501766760","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}}]}}]}' \ No newline at end of file