diff options
Diffstat (limited to 'products')
30 files changed, 1581 insertions, 16 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-sample/infra/cloud/cloud-create-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-moco.json new file mode 100644 index 00000000..6e679b4c --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-moco.json @@ -0,0 +1,42 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-07", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-a0eb1dc2-626d-4b89-8c46-a6cb341d2810", + "Content-Type" : "application/json" + }, + "json" : { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-07", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "complex-name" : "clli3", + "cloud-zone" : "CloudZone", + "sriov-automation" : "false", + "identity-url" : "url", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-07\"}", + "esr-system-info-list" : { + "esr-system-info" : [ { + "esr-system-info-id" : "5c85ce1f-aa78-4ebf-8d6f-4b62773e9bce", + "service-url" : "http://10.12.11.1:5000/v3", + "user-name" : "cloud_username", + "password" : "cloud_password", + "system-type" : "VIM", + "ssl-insecure" : "true", + "cloud-domain" : "Default", + "default-tenant" : "Integration-HPA", + "system-status" : "active" + } ] + } + } + }, + "response" : { + "status" : 201, + "json" : null + } +} ] diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-sample.yaml new file mode 100644 index 00000000..9948815e --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-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: cloud-create +version: onap-dublin +samples: + sample1: + name: cloud-create + input: -e 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bce -b cloud_username -I {\"openstack-region-id\":\"ONAP-POD-01-Rail-07\"} -x CloudOwner -y ONAP-POD-01-Rail-07 -j cloud_password -w titanium_cloud -l Integration-HPA -url http://10.12.11.1:5000/v3 -n clli3 -q openstack -r t1 -Q VIM -i url -g CloudZone -z true -k active -c Default + moco: cloud-create-schema-dublin-moco.json + output: diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-dublin-moco.json new file mode 100644 index 00000000..33d6378d --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-dublin-moco.json @@ -0,0 +1,25 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v14//aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-07/relationship-list/relationship", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-743a8d74-cb83-458b-ace3-05b10a169c0f", + "Content-Type" : "application/json" + }, + "json" : { + "related-to" : "complex", + "related-link" : "/aai/v11/cloud-infrastructure/complexes/complex/clli3", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli3" + } ] + } + }, + "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/infra/complex/complex-associate-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-dublin-sample.yaml new file mode 100644 index 00000000..d8f02401 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-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: complex-associate + version: onap-dublin + samples: + sample1: + name: complex-associate + input: -x clli3 -y ONAP-POD-01-Rail-07 -z CloudOwner + moco: complex-associate-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/infra/complex/complex-create-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-dublin-moco.json new file mode 100644 index 00000000..350a02e0 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-dublin-moco.json @@ -0,0 +1,35 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v14//aai/v14/cloud-infrastructure/complexes/complex/clli3", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-f84bd111-614f-4f6e-9bea-f076a8b63810", + "Content-Type" : "application/json" + }, + "json" : { + "physical-location-id" : "clli3", + "data-center-code" : "code6", + "complex-name" : "clli3", + "identity-url" : "url", + "physical-location-type" : "phy_type", + "street1" : "street1", + "street2" : "street2", + "city" : "HIlls", + "state" : "CA", + "postal-code" : "88888", + "country" : "usa", + "region" : "region_val", + "latitude" : "10.2", + "longitude" : "30.8", + "elevation" : "elev", + "lata" : "lata" + } + }, + "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/infra/complex/complex-create-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-dublin-sample.yaml new file mode 100644 index 00000000..044d5f6f --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-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: complex-create + version: onap-dublin + samples: + sample1: + name: complex-create + input: -j street2 -r phy_type -x clli3 -y code6 -lt 10.2 -l region_val -i street1 -lo 30.8 -S CA -la lata -g HIlls -w 88888 -z clli3 -k usa -o elev -q url + moco: complex-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/infra/complex/complex-delete-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-delete-schema-dublin-moco.json new file mode 100644 index 00000000..f8b238b3 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-delete-schema-dublin-moco.json @@ -0,0 +1,18 @@ +[ { + "request" : { + "method" : "delete", + "uri" : "/aai/v14//aai/v14/cloud-infrastructure/complexes/complex/clli3", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-26090fb4-0d07-4272-bced-b14574420451", + "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/infra/complex/complex-delete-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-delete-schema-dublin-sample.yaml new file mode 100644 index 00000000..7ba3c306 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-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: complex-delete + version: onap-dublin + samples: + sample1: + name: complex-delete + input: -x clli3 -y 1550771530582 + moco: complex-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/infra/complex/complex-list-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-list-schema-dublin-moco.json new file mode 100644 index 00000000..40a8d7f3 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-list-schema-dublin-moco.json @@ -0,0 +1,155 @@ +[ { + "request" : { + "method" : "get", + "uri" : "/aai/v14//aai/v14/cloud-infrastructure/complexes/", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-6752433d-3b43-41a3-9547-9a58a9f0f8f5", + "Content-Type" : "application/json" + }, + "json" : null + }, + "response" : { + "status" : 200, + "json" : { + "complex" : [ { + "physical-location-id" : "clli1", + "data-center-code" : "example-data-center-code-val-5556", + "complex-name" : "clli1", + "identity-url" : "example-identity-url-val-56898", + "resource-version" : "1547842499867", + "physical-location-type" : "example-physical-location-type-val-7608", + "street1" : "example-street1-val-34205", + "street2" : "example-street2-val-99210", + "city" : "example-city-val-27150", + "state" : "example-state-val-59487", + "postal-code" : "00000", + "country" : "USA", + "region" : "example-region-val-13893", + "latitude" : "32.89948", + "longitude" : "97.045443", + "elevation" : "example-elevation-val-28399", + "lata" : "example-lata-val-28399", + "relationship-list" : { + "relationship" : [ { + "related-to" : "cloud-region", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-05", + "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" + } ], + "related-to-property" : [ { + "property-key" : "cloud-region.owner-defined-type", + "property-value" : "t1" + } ] + }, { + "related-to" : "cloud-region", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-04", + "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" + } ], + "related-to-property" : [ { + "property-key" : "cloud-region.owner-defined-type", + "property-value" : "t1" + } ] + }, { + "related-to" : "cloud-region", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-06", + "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" + } ], + "related-to-property" : [ { + "property-key" : "cloud-region.owner-defined-type", + "property-value" : "t1" + } ] + }, { + "related-to" : "cloud-region", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne", + "relationship-data" : [ { + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "CloudOwner" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "RegionOne" + } ], + "related-to-property" : [ { + "property-key" : "cloud-region.owner-defined-type", + "property-value" : "t1" + } ] + } ] + } + }, { + "physical-location-id" : "clli2", + "data-center-code" : "code6", + "complex-name" : "clli2", + "identity-url" : "url", + "resource-version" : "1551206645488", + "physical-location-type" : "phy_type", + "street1" : "street1", + "street2" : "street2", + "city" : "HIlls", + "state" : "OR", + "postal-code" : "88889", + "country" : "ENG", + "region" : "region_val", + "latitude" : "100.2", + "longitude" : "30.8", + "elevation" : "elev", + "lata" : "lata", + "relationship-list" : { + "relationship" : [ { + "related-to" : "cloud-region", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-07", + "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" + } ], + "related-to-property" : [ { + "property-key" : "cloud-region.owner-defined-type", + "property-value" : "t1" + } ] + } ] + } + }, { + "physical-location-id" : "clli3", + "data-center-code" : "code6", + "complex-name" : "clli3", + "identity-url" : "url", + "resource-version" : "1552414833543", + "physical-location-type" : "phy_type", + "street1" : "street1", + "street2" : "street2", + "city" : "HIlls", + "state" : "CA", + "postal-code" : "88888", + "country" : "NIG", + "region" : "region_val", + "latitude" : "10.2", + "longitude" : "30.8", + "elevation" : "elev", + "lata" : "lata" + } ] + } + } +} ]
\ No newline at end of file diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-list-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-list-schema-dublin-sample.yaml new file mode 100644 index 00000000..c8320fd5 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-list-schema-dublin-sample.yaml @@ -0,0 +1,31 @@ +# 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: complex-list +version: onap-dublin +samples: + sample1: + name: complex-list + input: + moco: complex-list-schema-dublin-moco.json + output: | + +--------------+------------------------------------+------------------+----------+--------------------------+----------+------------+------------------------------+ + |complex-name |data-center-code |resource-version |country |region |latitude |longitude |elevation | + +--------------+------------------------------------+------------------+----------+--------------------------+----------+------------+------------------------------+ + |clli1 |example-data-center-code-val-5556 |1547842499867 |USA |example-region-val-13893 |32.89948 |97.045443 |example-elevation-val-28399 | + +--------------+------------------------------------+------------------+----------+--------------------------+----------+------------+------------------------------+ + |clli2 |code6 |1551206645488 |ENG |region_val |100.2 |30.8 |elev | + +--------------+------------------------------------+------------------+----------+--------------------------+----------+------------+------------------------------+ + |clli3 |code6 |1552414833543 |NIG |region_val |10.2 |30.8 |elev | + +--------------+------------------------------------+------------------+----------+--------------------------+----------+------------+------------------------------+ diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-update-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-update-schema-dublin-moco.json new file mode 100644 index 00000000..fcab9dbb --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-update-schema-dublin-moco.json @@ -0,0 +1,36 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v14//aai/v14/cloud-infrastructure/complexes/complex/clli3", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-f54bb608-f004-466b-9668-7c47cb8910bb", + "Content-Type" : "application/json" + }, + "json" : { + "physical-location-id" : "clli3", + "data-center-code" : "code6", + "complex-name" : "clli3", + "identity-url" : "url", + "physical-location-type" : "phy_type", + "street1" : "street1", + "street2" : "street2", + "city" : "HIlls", + "state" : "CA", + "postal-code" : "88888", + "country" : "NIG", + "region" : "region_val", + "latitude" : "10.2", + "longitude" : "30.8", + "elevation" : "elev", + "lata" : "lata", + "resource-version" : "1552414736878" + } + }, + "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/infra/complex/complex-update-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-update-schema-dublin-sample.yaml new file mode 100644 index 00000000..7630bd38 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-update-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: complex-update + version: onap-dublin + samples: + sample1: + name: complex-update + input: -j street2 -r phy_type -x clli3 -y code6 -lt 10.2 -l region_val -i street1 -lo 30.8 -S CA -la lata -g HIlls -w 88888 -z clli3 -k NIG -o elev -q url -R 1552414736878 + moco: complex-update-schema-dublin-moco.json + output:
\ No newline at end of file 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 diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-dublin.yaml index f46bebde..ad56e529 100644 --- a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-dublin.yaml +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-dublin.yaml @@ -1,4 +1,4 @@ -# Copyright © Intel Corporation 2019 +# 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. @@ -19,15 +19,15 @@ description: Create a cloud region in Onap 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: cloud-name - description: Onap cloud name + - name: cloud-owner + description: Onap cloud owner type: string short_option: x - long_option: cloud-name + long_option: cloud-owner is_optional: false - name: region-name description: Onap region name @@ -35,14 +35,147 @@ parameters: short_option: y long_option: region-name is_optional: false + - name: cloud-type + description: Cloud type e.g openstack + type: string + short_option: q + long_option: cloud-type + is_optional: false + - name: owner-defined-type + description: owner defined type + type: string + short_option: r + long_option: owner-type + is_optional: false + - name: cloud-region-version + description: cloud region version e.g titanium_cloud + type: string + short_option: w + long_option: cloud-region-version + is_optional: false + - name: complex-name + description: Onap complex-name + type: string + short_option: n + long_option: complex-name + is_optional: false + - name: cloud-zone + description: Onap cloud zone + type: string + short_option: g + long_option: cloud-zone + is_optional: false + - name: region-name + description: Onap region name + type: string + short_option: y + long_option: region-name + is_optional: false + - name: sriov-automation + description: sriov automation, default is false + type: bool + short_option: S + long_option: sriov-automation + is_optional: true + default: false + - name: identity-url + description: Onap identity-url, updated by multicloud if multicloud is used + type: string + short_option: i + long_option: identity-url + is_optional: false + - name: esr-system-info-id + description: id for esr system (arbitrary UUID e.g 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bc8) + type: uuid + short_option: e + long_option: esr-id + is_optional: false + - name: service-url + description: service-url i.e keystone url for openstack + type: string + short_option: url + long_option: service-url + is_optional: false + - name: user-name + description: cloud user name + type: string + short_option: b + long_option: user-name + is_optional: false + - name: password + description: cloud password + type: string + short_option: j + long_option: password + is_optional: false + - name: system-type + description: system type for cloud e.g VIM + type: string + short_option: Q + long_option: system-type + is_optional: false + - name: ssl-insecure + description: to use ssl insecure or not, default is true + type: bool + short_option: z + long_option: ssl-insecure + is_optional: false + - name: cloud-domain + description: cloud domain, default is Default + type: string + short_option: c + long_option: cloud-domain + is_optional: false + - name: default-tenant + description: default cloud tenant to use + type: string + short_option: l + long_option: default-tenant + is_optional: false + - name: system-status + description: status of the cloud, default is active + type: string + short_option: k + long_option: system-status + is_optional: false + - name: cloud-extra-info + description: extra info to register cloud , generally string with region id e.g {\"openstack-region-id\":\"region-id\"}, enter as {\\"openstack-region-id\\":\\"ONAP-POD-01-Rail-07\\"} with CLI + type: string + short_option: I + long_option: extra-info + is_optional: false http: service: auth: basic mode: direct request: - uri: /aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${cloud-name}/${region-name} + uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${region-name} method: PUT - body: '{"sriov-automation": false, "cloud-region-id": "${region-name}", "cloud-owner": "${cloud-name}", "new-attribute-for-demo": "blah", "number-attribute-for-demo": 1 }' + body: '{ + "cloud-owner": "${cloud-owner}", + "cloud-region-id": "${region-name}", + "cloud-type": "${cloud-type}", + "owner-defined-type": "${owner-defined-type}", + "cloud-region-version": "${cloud-region-version}", + "complex-name":"${complex-name}", + "cloud-zone": "${cloud-zone}", + "sriov-automation": "${sriov-automation}", + "identity-url": "${identity-url}", + "cloud-extra-info":"${cloud-extra-info}", + "esr-system-info-list": { + "esr-system-info":[ + { + "esr-system-info-id":"${esr-system-info-id}", + "service-url": "${service-url}", + "user-name":"${user-name}", + "password":"${password}", + "system-type": "${system-type}", + "ssl-insecure": "${ssl-insecure}", + "cloud-domain":"${cloud-domain}", + "default-tenant":"${default-tenant}", + "system-status":"${system-status}" + }]} + }' success_codes: - 201 diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-associate-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-associate-schema-dublin.yaml new file mode 100644 index 00000000..cdc05baf --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-associate-schema-dublin.yaml @@ -0,0 +1,61 @@ +# 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: complex-associate +description: Associate a cloud region with a cloud complex + +info: + product: onap-dublin + service: aai + author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com) + +parameters: + - name: complex-name + description: name of cloud complex + type: string + short_option: x + long_option: complex-name + is_optional: false + - name: cloud-region + description: name of registered cloud-region + type: string + short_option: y + long_option: cloud-region + is_optional: false + - name: cloud-owner + description: name of cloud-owner + type: string + short_option: z + long_option: cloud-owner + is_optional: false + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/relationship-list/relationship + method: PUT + body: '{ + "related-to": "complex", + "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/${complex-name}", + "relationship-data": [ + { + "relationship-key": "complex.physical-location-id", + "relationship-value": "${complex-name}" + }] + }' + success_codes: + - 200 diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-create-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-create-schema-dublin.yaml new file mode 100644 index 00000000..d2e6d4d4 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-create-schema-dublin.yaml @@ -0,0 +1,149 @@ +# 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: complex-create +description: Create a cloud complex in Onap + +info: + product: onap-dublin + service: aai + author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com) + +parameters: + - name: physical-location-id + description: id of physical location + type: string + short_option: x + long_option: physical-location-id + is_optional: false + - name: data-center-code + description: datacenter name + type: string + short_option: y + long_option: data-center-code + is_optional: false + - name: complex-name + description: complex name + type: string + short_option: z + long_option: complex-name + is_optional: false + - name: identity-url + description: identity url for complex + type: string + short_option: q + long_option: identity-url + is_optional: false + - name: physical-location-type + description: complex physical location type + type: string + short_option: r + long_option: physical-location-type + is_optional: false + - name: street1 + description: name of street 1 for complex + type: string + short_option: i + long_option: street1 + is_optional: false + - name: street2 + description: name of street 2 for complex + type: string + short_option: j + long_option: street2 + is_optional: false + - name: city + description: city complex is located in + type: string + short_option: g + long_option: city + is_optional: false + - name: state + description: state complex is located in + type: string + short_option: S + long_option: state + is_optional: false + - name: postal-code + description: postal code for complex + type: string + short_option: w + long_option: postal-code + is_optional: false + - name: country + description: country complex is located + type: string + short_option: k + long_option: country + is_optional: false + - name: region + description: region complex is located + type: string + short_option: l + long_option: region + is_optional: false + - name: latitude + description: latitude of complex location + type: string + short_option: lt + long_option: latitude + is_optional: false + - name: longitude + description: longitude of complex location + type: string + short_option: lo + long_option: longitude + is_optional: false + - name: elevation + description: elevation of complex location + type: string + short_option: o + long_option: elevation + is_optional: false + - name: lata + description: lata of complex + type: string + short_option: la + long_option: lata + is_optional: false + + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v14/cloud-infrastructure/complexes/complex/${complex-name} + method: PUT + body: '{ + "physical-location-id": "${physical-location-id}", + "data-center-code": "${data-center-code}", + "complex-name": "${complex-name}", + "identity-url": "${identity-url}", + "physical-location-type": "${physical-location-type}", + "street1": "${street1}", + "street2": "${street2}", + "city": "${city}", + "state": "${state}", + "postal-code": "${postal-code}", + "country": "${country}", + "region": "${region}", + "latitude": "${latitude}", + "longitude": "${longitude}", + "elevation": "${elevation}", + "lata": "${lata}" + }' + success_codes: + - 201 diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-delete-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-delete-schema-dublin.yaml new file mode 100644 index 00000000..4af9f1a2 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-delete-schema-dublin.yaml @@ -0,0 +1,46 @@ +# 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: complex-delete +description: Delete a complex from Onap + +info: + product: onap-dublin + service: aai + author: ONAP HPA Integration Team (itohan.ukponmwan@intel.com) + +parameters: + - name: complex-name + description: Onap complex name + type: string + short_option: x + long_option: complex-name + is_optional: false + - name: resource-version + description: Onap complex region version + type: uuid + short_option: y + long_option: resource-version + is_optional: true +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v14/cloud-infrastructure/complexes/complex/${complex-name}?resource-version=${resource-version} + method: DELETE + success_codes: + - 204 + - 404 diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-list-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-list-schema-dublin.yaml new file mode 100644 index 00000000..944eb357 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-list-schema-dublin.yaml @@ -0,0 +1,122 @@ +# 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: complex-list +description: List the configured complexes + +info: + product: onap-dublin + service: aai + author: ONAP HPA Integration Team (itohan.ukponmwan@intel.com) + +results: + direction: landscape + attributes: + - name: complex-name + description: onap complex + scope: short + type: string + - name: physical-location-id + description: onap complex location id + scope: long + type: string + - name: data-center-code + description: data center code + scope: short + type: string + - name: identity-url + description: identity url + scope: long + type: string + - name: resource-version + description: complex resource version + scope: short + type: string + - name: physical-location-type + description: physical location type + scope: long + type: string + - name: street1 + description: onap complex street1 + scope: long + type: string + - name: street2 + description: onap complex street2 + scope: long + type: string + - name: city + description: onap complex city + scope: long + type: string + - name: state + description: onap complex state + scope: long + type: string + - name: postal-code + description: onap complex postal code + scope: long + type: string + - name: country + description: onap complex country + scope: short + type: string + - name: region + description: onap complex region + scope: short + type: string + - name: latitude + description: onap complex latitude + scope: short + type: string + - name: longitude + description: onap complex longitude + scope: short + type: string + - name: elevation + description: onap complex elevation + scope: short + type: string + - name: lata + description: onap complex lata + scope: long + type: string + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v14/cloud-infrastructure/complexes/ + method: GET + success_codes: + - 200 + result_map: + physical-location-id: $b{complex.[*].physical-location-id} + data-center-code: $b{complex.[*].data-center-code} + complex-name: $b{complex.[*].complex-name} + identity-url: $b{complex.[*].identity-url} + resource-version: $b{complex.[*].resource-version} + physical-location-type: $b{complex.[*].physical-location-type} + street1: $b{complex.[*].street1} + street2: $b{complex.[*].street2} + city: $b{complex.[*].city} + state: $b{complex.[*].state} + postal-code: $b{complex.[*].postal-code} + country: $b{complex.[*].country} + region: $b{complex.[*].region} + latitude: $b{complex.[*].latitude} + longitude: $b{complex.[*].longitude} + elevation: $b{complex.[*].elevation} + lata: $b{complex.[*].lata} diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-update-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-update-schema-dublin.yaml new file mode 100644 index 00000000..e832f606 --- /dev/null +++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-update-schema-dublin.yaml @@ -0,0 +1,156 @@ +# 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: complex-update +description: Update a cloud complex in Onap + +info: + product: onap-dublin + service: aai + author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com) + +parameters: + - name: physical-location-id + description: id of physical location + type: string + short_option: x + long_option: physical-location-id + is_optional: false + - name: data-center-code + description: datacenter name + type: string + short_option: y + long_option: data-center-code + is_optional: false + - name: complex-name + description: complex name + type: string + short_option: z + long_option: complex-name + is_optional: false + - name: identity-url + description: identity url for complex + type: string + short_option: q + long_option: identity-url + is_optional: false + - name: physical-location-type + description: complex physical location type + type: string + short_option: r + long_option: physical-location-type + is_optional: false + - name: street1 + description: name of street 1 for complex + type: string + short_option: i + long_option: street1 + is_optional: false + - name: street2 + description: name of street 2 for complex + type: string + short_option: j + long_option: street2 + is_optional: false + - name: city + description: city complex is located in + type: string + short_option: g + long_option: city + is_optional: false + - name: state + description: state complex is located in + type: string + short_option: S + long_option: state + is_optional: false + - name: postal-code + description: postal code for complex + type: string + short_option: w + long_option: postal-code + is_optional: false + - name: country + description: country complex is located + type: string + short_option: k + long_option: country + is_optional: false + - name: region + description: region complex is located + type: string + short_option: l + long_option: region + is_optional: false + - name: latitude + description: latitude of complex location + type: string + short_option: lt + long_option: latitude + is_optional: false + - name: longitude + description: longitude of complex location + type: string + short_option: lo + long_option: longitude + is_optional: false + - name: elevation + description: elevation of complex location + type: string + short_option: o + long_option: elevation + is_optional: false + - name: lata + description: lata of complex + type: string + short_option: la + long_option: lata + is_optional: false + - name: resource-version + description: resource version of complex to be updated + type: uuid + short_option: R + long_option: resource-version + is_optional: false + + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v14/cloud-infrastructure/complexes/complex/${complex-name} + method: PUT + body: '{ + "physical-location-id": "${physical-location-id}", + "data-center-code": "${data-center-code}", + "complex-name": "${complex-name}", + "identity-url": "${identity-url}", + "physical-location-type": "${physical-location-type}", + "street1": "${street1}", + "street2": "${street2}", + "city": "${city}", + "state": "${state}", + "postal-code": "${postal-code}", + "country": "${country}", + "region": "${region}", + "latitude": "${latitude}", + "longitude": "${longitude}", + "elevation": "${elevation}", + "lata": "${lata}", + "resource-version": "${resource-version}" + }' + success_codes: + - 200 diff --git a/products/onap-dublin/features/multicloud/pom.xml b/products/onap-dublin/features/multicloud/pom.xml new file mode 100644 index 00000000..3fe2dd0b --- /dev/null +++ b/products/onap-dublin/features/multicloud/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright © Intel Corporation 2018 + + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-dublin-features</artifactId> + <version>2.0.6</version> + </parent> + + <artifactId>cli-products-onap-dublin-features-multicloud</artifactId> + <name>cli/products/onap-dublin/features/multicloud</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-dublin/features/pom.xml b/products/onap-dublin/features/pom.xml index 9c0cc7fa..3b6335ff 100644 --- a/products/onap-dublin/features/pom.xml +++ b/products/onap-dublin/features/pom.xml @@ -36,6 +36,7 @@ <module>msb</module> <module>sdc</module> <module>policy</module> + <module>multicloud</module> </modules> <build> |