summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-13 22:31:13 +0000
committerItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-13 22:31:13 +0000
commit143b0ebc6b52cebc4955f227553b2abe83c9cd84 (patch)
tree11ae425d14c5aa521d29ba432daa8b5d8979c2f5
parent65d9d65c6e3bf9f4f5590a3ba3d9234b63c04596 (diff)
Subscription schema files for onap-dublin CLI
-Updated subscription-create to use cloud-parameters -New command to add newcloud to already existing subscription Change-Id: I25abaae4286bf67bdcf074c2b7552e654c3acb0c Issue-ID: CLI-134 CLI-153 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-moco.json36
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-sample.yaml22
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-moco.json41
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-sample.yaml22
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-moco.json18
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-sample.yaml22
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-moco.json80
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-sample.yaml27
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-dublin.yaml100
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-dublin.yaml54
10 files changed, 413 insertions, 9 deletions
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-moco.json
new file mode 100644
index 00000000..f2962437
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-moco.json
@@ -0,0 +1,36 @@
+[ {
+ "request" : {
+ "method" : "put",
+ "uri" : "/aai/v14/business/customers/customer/hpa_cust/service-subscriptions/service-subscription/test-service/relationship-list/relationship",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-e2495d77-8802-4b57-b935-7cfedc047821",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "related-to" : "tenant",
+ "relationship-label" : "org.onap.relationships.inventory.Uses",
+ "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-07/tenants/tenant/709ba629fe194f8699b12f9d6ffd86a0",
+ "relationship-data" : [ {
+ "relationship-key" : "cloud-region.cloud-owner",
+ "relationship-value" : "CloudOwner"
+ }, {
+ "relationship-key" : "cloud-region.cloud-region-id",
+ "relationship-value" : "ONAP-POD-01-Rail-07"
+ }, {
+ "relationship-key" : "tenant.tenant-id",
+ "relationship-value" : "709ba629fe194f8699b12f9d6ffd86a0"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "tenant.tenant-name",
+ "property-value" : "Integration-HPA"
+ } ]
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-sample.yaml
new file mode 100644
index 00000000..0ffd1d89
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-cloud-add-schema-dublin-sample.yaml
@@ -0,0 +1,22 @@
+# 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_sample_version: 1.0
+ name: subscription-cloud-add
+ version: onap-dublin
+ samples:
+ sample1:
+ name: subscription-cloud-add
+ input: -x hpa_cust -c 709ba629fe194f8699b12f9d6ffd86a0 -z CloudOwner -e test-service -y Integration-HPA -r ONAP-POD-01-Rail-07
+ moco: subscription-cloud-add-schema-dublin-moco.json
+ output: \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-moco.json
new file mode 100644
index 00000000..1233effd
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-moco.json
@@ -0,0 +1,41 @@
+[ {
+ "request" : {
+ "method" : "put",
+ "uri" : "/aai/v14/business/customers/customer/hpa_cust/service-subscriptions/service-subscription/test-service",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-6c818985-7492-4b34-9994-11753a1f954b",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "service-type" : "test-service",
+ "relationship-list" : {
+ "relationship" : [ {
+ "related-to" : "tenant",
+ "relationship-label" : "org.onap.relationships.inventory.Uses",
+ "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-06/tenants/tenant/709ba629fe194f8699b12f9d6ffd86a0",
+ "relationship-data" : [ {
+ "relationship-key" : "cloud-region.cloud-owner",
+ "relationship-value" : "CloudOwner"
+ }, {
+ "relationship-key" : "cloud-region.cloud-region-id",
+ "relationship-value" : "ONAP-POD-01-Rail-06"
+ }, {
+ "relationship-key" : "tenant.tenant-id",
+ "relationship-value" : "709ba629fe194f8699b12f9d6ffd86a0"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "tenant.tenant-name",
+ "property-value" : "Integration-HPA"
+ } ]
+ } ]
+ }
+ }
+ },
+ "response" : {
+ "status" : 201,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-sample.yaml
new file mode 100644
index 00000000..f48d036b
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-create-schema-dublin-sample.yaml
@@ -0,0 +1,22 @@
+# 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_sample_version: 1.0
+ name: subscription-create
+ version: onap-dublin
+ samples:
+ sample1:
+ name: subscription-create
+ input: -x hpa_cust -y Integration-HPA -z CloudOwner -e test-service -c 709ba629fe194f8699b12f9d6ffd86a0 -r ONAP-POD-01-Rail-06
+ moco: subscription-create-schema-dublin-moco.json
+ output: \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-moco.json
new file mode 100644
index 00000000..3339c580
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-moco.json
@@ -0,0 +1,18 @@
+[ {
+ "request" : {
+ "method" : "delete",
+ "uri" : "/aai/v13/business/customers/customer/hpa_cust/service-subscriptions/service-subscription/test-service",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-3a02dc1d-19b5-45d9-a34e-6d08a8b20a10",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 204,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-sample.yaml
new file mode 100644
index 00000000..f68f46bd
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-delete-schema-dublin-sample.yaml
@@ -0,0 +1,22 @@
+# 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_sample_version: 1.0
+ name: subscription-delete
+ version: onap-dublin
+ samples:
+ sample1:
+ name: subscription-delete
+ input: -x hpa_cust -y test-service -g 1552436359631
+ moco: subscription-delete-schema-dublin-moco.json
+ output: \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-moco.json
new file mode 100644
index 00000000..8723a866
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-moco.json
@@ -0,0 +1,80 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v13/business/customers/customer/hpa_cust/service-subscriptions",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-0617d23c-c9af-473a-9045-e964fd12d81f",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "service-subscription" : [ {
+ "service-type" : "vfwhpa",
+ "resource-version" : "1552436330116",
+ "relationship-list" : {
+ "relationship" : [ {
+ "related-to" : "tenant",
+ "relationship-label" : "org.onap.relationships.inventory.Uses",
+ "related-link" : "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-06/tenants/tenant/709ba629fe194f8699b12f9d6ffd86a0",
+ "relationship-data" : [ {
+ "relationship-key" : "cloud-region.cloud-owner",
+ "relationship-value" : "CloudOwner"
+ }, {
+ "relationship-key" : "cloud-region.cloud-region-id",
+ "relationship-value" : "ONAP-POD-01-Rail-06"
+ }, {
+ "relationship-key" : "tenant.tenant-id",
+ "relationship-value" : "709ba629fe194f8699b12f9d6ffd86a0"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "tenant.tenant-name",
+ "property-value" : "Integration-HPA"
+ } ]
+ }, {
+ "related-to" : "tenant",
+ "relationship-label" : "org.onap.relationships.inventory.Uses",
+ "related-link" : "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-04/tenants/tenant/709ba629fe194f8699b12f9d6ffd86a0",
+ "relationship-data" : [ {
+ "relationship-key" : "cloud-region.cloud-owner",
+ "relationship-value" : "CloudOwner"
+ }, {
+ "relationship-key" : "cloud-region.cloud-region-id",
+ "relationship-value" : "ONAP-POD-01-Rail-04"
+ }, {
+ "relationship-key" : "tenant.tenant-id",
+ "relationship-value" : "709ba629fe194f8699b12f9d6ffd86a0"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "tenant.tenant-name",
+ "property-value" : "Integration-HPA"
+ } ]
+ }, {
+ "related-to" : "tenant",
+ "relationship-label" : "org.onap.relationships.inventory.Uses",
+ "related-link" : "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-05/tenants/tenant/709ba629fe194f8699b12f9d6ffd86a0",
+ "relationship-data" : [ {
+ "relationship-key" : "cloud-region.cloud-owner",
+ "relationship-value" : "CloudOwner"
+ }, {
+ "relationship-key" : "cloud-region.cloud-region-id",
+ "relationship-value" : "ONAP-POD-01-Rail-05"
+ }, {
+ "relationship-key" : "tenant.tenant-id",
+ "relationship-value" : "709ba629fe194f8699b12f9d6ffd86a0"
+ } ],
+ "related-to-property" : [ {
+ "property-key" : "tenant.tenant-name",
+ "property-value" : "Integration-HPA"
+ } ]
+ } ]
+ }
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-sample.yaml
new file mode 100644
index 00000000..33e57b79
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/business/subscription/subscription-list-schema-dublin-sample.yaml
@@ -0,0 +1,27 @@
+# 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_sample_version: 1.0
+ name: subscription-list
+ version: onap-dublin
+ samples:
+ sample1:
+ name: subscription-list
+ input: -x hpa_cust
+ moco: subscription-list-schema-dublin-moco.json
+ output: |
+ +--------------+------------------+
+ |service-type |resource-version |
+ +--------------+------------------+
+ |vfwhpa |1552436330116 |
+ +--------------+------------------+
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-dublin.yaml
new file mode 100644
index 00000000..69ad5943
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-dublin.yaml
@@ -0,0 +1,100 @@
+# 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: subscription-cloud-add
+description: Add a new cloud region to a customer subscription
+
+info:
+ product: onap-dublin
+ service: aai
+ author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com)
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: cloud-owner
+ description: Onap cloud owner name
+ type: string
+ short_option: z
+ long_option: cloud-owner
+ is_optional: false
+ - name: cloud-region
+ description: Onap cloud region
+ type: string
+ short_option: r
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-tenant-id
+ description: Onap cloud tenant id
+ type: string
+ short_option: c
+ long_option: cloud-tenant-id
+ is_optional: false
+ - name: service-type
+ description: Onap service type
+ type: string
+ short_option: e
+ long_option: service-type
+ is_optional: false
+ - name: tenant-name
+ description: name of tenant to use in the cloud region
+ type: string
+ short_option: y
+ long_option: tenant-name
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v14/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}/relationship-list/relationship
+ method: PUT
+ context:
+ remove_empty_node: true
+ body: '{
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/tenants/tenant/${cloud-tenant-id}",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "${cloud-owner}"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "${cloud-region}"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "${cloud-tenant-id}"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "${tenant-name}"
+ }
+ ]
+ }'
+ success_codes:
+ - 200
+ - 201
+ sample_response:
+ body: ''
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-dublin.yaml
index 19f144d2..6623b9e7 100644
--- a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-dublin.yaml
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-dublin.yaml
@@ -19,7 +19,7 @@ description: Create a subscription of a customer for given service in specific c
info:
product: onap-dublin
service: aai
- author: ONAP CLI Team onap-discuss@lists.onap.org
+ author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com)
parameters:
- name: customer-name
@@ -28,41 +28,77 @@ parameters:
short_option: x
long_option: customer-name
is_optional: false
- - name: cloud-name
- description: Onap cloud name
+ - name: cloud-owner
+ description: Onap cloud owner name
type: string
short_option: z
- long_option: cloud-name
- is_optional: true
+ long_option: cloud-owner
+ is_optional: false
- name: cloud-region
description: Onap cloud region
type: string
short_option: r
long_option: cloud-region
- is_optional: true
+ is_optional: false
- name: cloud-tenant-id
description: Onap cloud tenant id
type: string
short_option: c
long_option: cloud-tenant-id
- is_optional: true
+ is_optional: false
- name: service-type
description: Onap service type
type: string
short_option: e
long_option: service-type
is_optional: false
+ - name: tenant-name
+ description: name of tenant to use in the cloud region
+ type: string
+ short_option: y
+ long_option: tenant-name
+ is_optional: false
http:
service:
auth: basic
mode: direct
request:
- uri: /aai/v13/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}
+ uri: /aai/v14/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}
method: PUT
context:
remove_empty_node: true
- body: '{"service-type":"${service-type}"}'
+ body: '{
+ "service-type": "${service-type}",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/tenants/tenant/${cloud-tenant-id}",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "${cloud-owner}"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "${cloud-region}"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "${cloud-tenant-id}"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "${tenant-name}"
+ }
+ ]
+ }
+ ]
+ } }'
success_codes:
- 200
- 201