aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-dublin
diff options
context:
space:
mode:
authorItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-04-19 16:59:27 +0000
committerItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-04-19 17:00:57 +0000
commit2b2f0520e9abbea858ca305f43f17a75165042f2 (patch)
treed856a1a1f19d69e8693624c7022b1142496ef807 /products/onap-dublin
parent34605c95ea7a9af4c4b86a4b5dee81a40d60686f (diff)
Command to list owning entities
Change-Id: I2504eab49e1cc5356420a0534dccbd5bcb8b1fd2 Issue-ID: CLI-162 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
Diffstat (limited to 'products/onap-dublin')
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-moco.json99
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-sample.yaml14
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-dublin.yaml52
3 files changed, 165 insertions, 0 deletions
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-moco.json
new file mode 100644
index 00000000..dc3198ee
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-moco.json
@@ -0,0 +1,99 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v14/business/owning-entities",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-a3f28812-cfc3-4b65-a050-4875125bd199",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "owning-entity" : [ {
+ "owning-entity-id" : "d005274f-d295-4538-a6b0-a090a7807dae",
+ "owning-entity-name" : "OE-Demonstration",
+ "resource-version" : "1555610846350",
+ "relationship-list" : {
+ "relationship" : [ {
+ "related-to" : "service-instance",
+ "relationship-label" : "org.onap.relationships.inventory.BelongsTo",
+ "related-link" : "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/1ed934d4-b2b7-48bb-9878-b06d9024be75",
+ "relationship-data" : [ {
+ "relationship-key" : "customer.global-customer-id",
+ "relationship-value" : "Demonstration"
+ }, {
+ "relationship-key" : "service-subscription.service-type",
+ "relationship-value" : "vFW"
+ }, {
+ "relationship-key" : "service-instance.service-instance-id",
+ "relationship-value" : "1ed934d4-b2b7-48bb-9878-b06d9024be75"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "service-instance.service-instance-name",
+ "property-value" : "test-instance"
+ } ]
+ }, {
+ "related-to" : "service-instance",
+ "relationship-label" : "org.onap.relationships.inventory.BelongsTo",
+ "related-link" : "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/946db590-a80a-48ff-b9f6-c5cd6eb670b7",
+ "relationship-data" : [ {
+ "relationship-key" : "customer.global-customer-id",
+ "relationship-value" : "Demonstration"
+ }, {
+ "relationship-key" : "service-subscription.service-type",
+ "relationship-value" : "vFW"
+ }, {
+ "relationship-key" : "service-instance.service-instance-id",
+ "relationship-value" : "946db590-a80a-48ff-b9f6-c5cd6eb670b7"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "service-instance.service-instance-name",
+ "property-value" : "vfw-demo"
+ } ]
+ }, {
+ "related-to" : "service-instance",
+ "relationship-label" : "org.onap.relationships.inventory.BelongsTo",
+ "related-link" : "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/70e66244-d4b8-4dcf-985a-490599ce90ef",
+ "relationship-data" : [ {
+ "relationship-key" : "customer.global-customer-id",
+ "relationship-value" : "Demonstration"
+ }, {
+ "relationship-key" : "service-subscription.service-type",
+ "relationship-value" : "vFW"
+ }, {
+ "relationship-key" : "service-instance.service-instance-id",
+ "relationship-value" : "70e66244-d4b8-4dcf-985a-490599ce90ef"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "service-instance.service-instance-name",
+ "property-value" : "vfw-sriov"
+ } ]
+ }, {
+ "related-to" : "service-instance",
+ "relationship-label" : "org.onap.relationships.inventory.BelongsTo",
+ "related-link" : "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/06e28fa2-7f75-46d0-a944-c6a1aca9f171",
+ "relationship-data" : [ {
+ "relationship-key" : "customer.global-customer-id",
+ "relationship-value" : "Demonstration"
+ }, {
+ "relationship-key" : "service-subscription.service-type",
+ "relationship-value" : "vFW"
+ }, {
+ "relationship-key" : "service-instance.service-instance-id",
+ "relationship-value" : "06e28fa2-7f75-46d0-a944-c6a1aca9f171"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "service-instance.service-instance-name",
+ "property-value" : "vfw-basic-1"
+ } ]
+ } ]
+ }
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-sample.yaml
new file mode 100644
index 00000000..ef2296ed
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/owning-entity/owning-entity-list-schema-dublin-sample.yaml
@@ -0,0 +1,14 @@
+open_cli_sample_version: 1.0
+name: -u
+version: onap-dublin
+samples:
+ sample1:
+ name: -u
+ input: AAI -p AAI -m https://192.168.1.147:30233 -s
+ moco: owning-entity-list-schema-dublin-moco.json
+ output: |
+ +------------------+--------------------------------------+------------------+
+ |name |Id |resource-version |
+ +------------------+--------------------------------------+------------------+
+ |OE-Demonstration |d005274f-d295-4538-a6b0-a090a7807dae |1555610846350 |
+ +------------------+--------------------------------------+------------------+
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-dublin.yaml
new file mode 100644
index 00000000..3c663202
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-dublin.yaml
@@ -0,0 +1,52 @@
+# Copyright © Intel Corporation 2019
+#
+# 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: owning-entity-list
+description: Lists the Owning Entities in Onap
+
+info:
+ product: onap-dublin
+ service: aai
+ author: ONAP HPA Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Owning entity name
+ scope: short
+ type: string
+ - name: Id
+ description: Owning entity Id
+ scope: short
+ type: string
+ - name: resource-version
+ description: Owning entity resource version
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v14/business/owning-entities
+ method: GET
+ success_codes:
+ - 200
+ - 404
+ result_map:
+ name: $b{owning-entity.[*].owning-entity-name}
+ Id: $b{owning-entity.[*].owning-entity-id}
+ resource-version: $b{owning-entity.[*].resource-version}