CLI: customer-list beijing 85/36485/1
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 19 Mar 2018 10:08:02 +0000 (15:38 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 19 Mar 2018 10:08:02 +0000 (15:38 +0530)
Change-Id: Idfe18cc2fab21779c11ab9edaf733fd18d75d4d9
Issue-ID: CLI-100
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-moco.json [new file with mode: 0644]
products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-sample.yaml [new file with mode: 0644]
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-beijing.yaml [new file with mode: 0644]

diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-moco.json b/products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-moco.json
new file mode 100644 (file)
index 0000000..f773727
--- /dev/null
@@ -0,0 +1,35 @@
+[ {
+  "request" : {
+    "method" : "get",
+    "uri" : "/aai/v11/business/customers",
+    "headers" : {
+      "Authorization" : "Basic QUFJOkFBSQ==",
+      "X-FromAppId" : "onap-cli",
+      "Accept" : "application/json",
+      "X-TransactionId" : "req-f56d4034-1ee8-469c-848a-8b9cd1afa19b",
+      "Content-Type" : "application/json"
+    },
+    "json" : null
+  },
+  "response" : {
+    "status" : 200,
+    "json" : {
+      "customer" : [ {
+        "global-customer-id" : "test",
+        "subscriber-name" : "test",
+        "subscriber-type" : "INFRA",
+        "resource-version" : "1509029022293"
+      }, {
+        "global-customer-id" : "kanag",
+        "subscriber-name" : "kanag",
+        "subscriber-type" : "INFRA",
+        "resource-version" : "1509029007060"
+      }, {
+        "global-customer-id" : "Demonstration",
+        "subscriber-name" : "Demonstration",
+        "subscriber-type" : "INFRA",
+        "resource-version" : "1508827908763"
+      } ]
+    }
+  }
+} ]
\ No newline at end of file
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-sample.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-sample/customer/customer-list-schema-beijing-sample.yaml
new file mode 100644 (file)
index 0000000..f76ed22
--- /dev/null
@@ -0,0 +1,32 @@
+# 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_sample_version: 1.0
+name: customer-list
+version: onap-beijing
+samples:
+  sample1:
+    name: customer-list
+    input:
+    moco: customer-list-schema-1.1-moco.json
+    output: |
+      +----------------+------------------+
+      |name            |resource-version  |
+      +----------------+------------------+
+      |test            |1509029022293     |
+      +----------------+------------------+
+      |kanag           |1509029007060     |
+      +----------------+------------------+
+      |Demonstration   |1508827908763     |
+      +----------------+------------------+
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-beijing.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-beijing.yaml
new file mode 100644 (file)
index 0000000..95acb58
--- /dev/null
@@ -0,0 +1,48 @@
+# 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-list
+description: Lists the registered customers in Onap
+
+info:
+  product: onap-beijing
+  service: aai
+  author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+  direction: landscape
+  attributes:
+    - name: name
+      description: Onap customer name
+      scope: short
+      type: string
+    - name: resource-version
+      description: Onap customer resource version
+      scope: short
+      type: string
+http:
+  service:
+    auth: basic
+    mode: direct
+  request:
+    uri: /aai/v11/business/customers
+    method: GET
+  success_codes:
+    - 200
+  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