From a52f00e9d0af1181d3e9c87508789fb4ced022f5 Mon Sep 17 00:00:00 2001 From: Itohan Date: Mon, 30 Sep 2019 23:39:44 +0000 Subject: Minor bug fixes in CLI - Added USER_ID header for SDC - Changed multicloud url - Added samples for commands - Fixed Bug in service-create command Signed-off-by: Itohan Ukponmwan Issue-ID: CLI-229 Change-Id: I9ec94d6dd390d2b5bf059c2f8a82c67b65fbeb34 --- .../cloud/cloud-create-schema-elalto-moco.json | 42 +++++ .../cloud/cloud-create-schema-elalto-sample.yaml | 9 + .../infra/cloud/cloud-list-schema-elalto-moco.json | 187 +++++++++++++++++++++ .../cloud/cloud-list-schema-elalto-sample.yaml | 24 +++ .../complex-associate-schema-elalto-moco.json | 25 +++ .../complex-associate-schema-elalto-sample.yaml | 9 + .../complex/complex-create-schema-elalto-moco.json | 35 ++++ .../complex-create-schema-elalto-sample.yaml | 9 + 8 files changed, 340 insertions(+) create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-moco.json create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-sample.yaml create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-moco.json create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-sample.yaml create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-moco.json create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-sample.yaml create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-moco.json create mode 100644 products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-sample.yaml (limited to 'products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra') diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-moco.json b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-moco.json new file mode 100644 index 00000000..96bab575 --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-moco.json @@ -0,0 +1,42 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-04", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-ff73dac4-ba43-427b-8442-01b998817f0a", + "Content-Type" : "application/json" + }, + "json" : { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-04", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "complex-name" : "clli1", + "cloud-zone" : "CloudZone", + "sriov-automation" : "false", + "identity-url" : "WillBeUpdatedByMultiCloud", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-04\"}", + "esr-system-info-list" : { + "esr-system-info" : [ { + "esr-system-info-id" : "8c85ce1f-aa78-45bf-8d6f-4b62784e9bc7", + "service-url" : "http://10.12.11.1:5000/v3", + "user-name" : "itohan_ukponmwan", + "password" : "ONAP-pod-01_2d:ff", + "system-type" : "VIM", + "ssl-insecure" : "true", + "cloud-domain" : "Default", + "default-tenant" : "Integration-HPA", + "system-status" : "active" + } ] + } + } + }, + "response" : { + "status" : 201, + "json" : null + } +} ] \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-sample.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-sample.yaml new file mode 100644 index 00000000..6529bc58 --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-elalto-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: cloud-create +version: onap-elalto +samples: + sample1: + name: cloud-create + input: -e 8c85ce1f-aa78-45bf-8d6f-4b62784e9bc7 -b itohan_ukponmwan -x CloudOwner -y ONAP-POD-01-Rail-04 -j ONAP-pod-01_2d:ff -w titanium_cloud -l Integration-HPA -url http://10.12.11.1:5000/v3 -n clli1 -q openstack -r t1 -Q VIM -i WillBeUpdatedByMultiCloud -g CloudZone -z True -k active -c Default -m https://10.12.5.110:30233 -u AAI -p AAI + moco: cloud-create-schema-elalto-moco.json + output: \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-moco.json b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-moco.json new file mode 100644 index 00000000..14668c6a --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-moco.json @@ -0,0 +1,187 @@ +[ { + "request" : { + "method" : "get", + "uri" : "/aai/v16/cloud-infrastructure/cloud-regions", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-82e1515e-60e9-484b-beab-5120d926c3b5", + "Content-Type" : "application/json" + }, + "json" : null + }, + "response" : { + "status" : 200, + "json" : { + "cloud-region" : [ { + "cloud-owner" : "k8scloudowner1", + "cloud-region-id" : "k8sregionone", + "cloud-type" : "k8s", + "owner-defined-type" : "t1", + "cloud-region-version" : "1.0", + "cloud-zone" : "CloudZone", + "complex-name" : "clli1", + "sriov-automation" : "false", + "cloud-extra-info" : "{\"openstack-region-id\":\"k8sregionone\"}", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569534556132", + "relationship-list" : { + "relationship" : [ { + "related-to" : "complex", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } ] + } + }, { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-06", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "identity-url" : "http://msb-iag.onap:80/api/multicloud-titaniumcloud/v1/CloudOwner/ONAP-POD-01-Rail-06/identity/v2.0", + "cloud-zone" : "CloudZone", + "complex-name" : "clli1", + "sriov-automation" : "false", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-06\"}", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569537456041", + "relationship-list" : { + "relationship" : [ { + "related-to" : "pserver", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/pservers/pserver/CloudOwner_ONAP-POD-01-Rail-06_controller-0", + "relationship-data" : [ { + "relationship-key" : "pserver.hostname", + "relationship-value" : "CloudOwner_ONAP-POD-01-Rail-06_controller-0" + } ], + "related-to-property" : [ { + "property-key" : "pserver.pserver-name2" + } ] + }, { + "related-to" : "complex", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } ] + } + }, { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-04", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "identity-url" : "http://msb-iag.onap:80/api/multicloud-titaniumcloud/v1/CloudOwner/ONAP-POD-01-Rail-04/identity/v2.0", + "cloud-zone" : "CloudZone", + "complex-name" : "clli1", + "sriov-automation" : "false", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-04\"}", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569537472345", + "relationship-list" : { + "relationship" : [ { + "related-to" : "pserver", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/pservers/pserver/CloudOwner_ONAP-POD-01-Rail-04_controller-0", + "relationship-data" : [ { + "relationship-key" : "pserver.hostname", + "relationship-value" : "CloudOwner_ONAP-POD-01-Rail-04_controller-0" + } ], + "related-to-property" : [ { + "property-key" : "pserver.pserver-name2" + } ] + }, { + "related-to" : "complex", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } ] + } + }, { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-07", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "identity-url" : "http://msb-iag.onap:80/api/multicloud-titaniumcloud/v1/CloudOwner/ONAP-POD-01-Rail-07/identity/v2.0", + "cloud-zone" : "CloudZone", + "complex-name" : "clli1", + "sriov-automation" : "false", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-07\"}", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569537445468", + "relationship-list" : { + "relationship" : [ { + "related-to" : "pserver", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/pservers/pserver/CloudOwner_ONAP-POD-01-Rail-07_controller-0", + "relationship-data" : [ { + "relationship-key" : "pserver.hostname", + "relationship-value" : "CloudOwner_ONAP-POD-01-Rail-07_controller-0" + } ], + "related-to-property" : [ { + "property-key" : "pserver.pserver-name2" + } ] + }, { + "related-to" : "complex", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } ] + } + }, { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "ONAP-POD-01-Rail-05", + "cloud-type" : "openstack", + "owner-defined-type" : "t1", + "cloud-region-version" : "titanium_cloud", + "identity-url" : "http://msb-iag.onap:80/api/multicloud-titaniumcloud/v1/CloudOwner/ONAP-POD-01-Rail-05/identity/v2.0", + "cloud-zone" : "CloudZone", + "complex-name" : "clli1", + "sriov-automation" : "false", + "cloud-extra-info" : "{\"openstack-region-id\":\"ONAP-POD-01-Rail-05\"}", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569537463136", + "relationship-list" : { + "relationship" : [ { + "related-to" : "complex", + "relationship-label" : "org.onap.relationships.inventory.LocatedIn", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } ] + } + }, { + "cloud-owner" : "CloudOwner", + "cloud-region-id" : "RegionOne", + "cloud-type" : "SharedNode", + "owner-defined-type" : "OwnerType", + "cloud-region-version" : "v1", + "cloud-zone" : "CloudZone", + "orchestration-disabled" : false, + "in-maint" : false, + "resource-version" : "1569538337999" + } ] + } + } +} ] \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-sample.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-sample.yaml new file mode 100644 index 00000000..44ac9a74 --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-list-schema-elalto-sample.yaml @@ -0,0 +1,24 @@ +open_cli_sample_version: 1.0 +name: cloud-list +version: onap-elalto +samples: + sample1: + name: cloud-list + input: -u AAI -p AAI -m https://10.12.5.110:30233 --debug + moco: cloud-list-schema-elalto-moco.json + output: | + +----------------+----------------------+------------------+ + |cloud |region |resource-version | + +----------------+----------------------+------------------+ + |k8scloudowner1 |k8sregionone |1569534556132 | + +----------------+----------------------+------------------+ + |CloudOwner |ONAP-POD-01-Rail-06 |1569537456041 | + +----------------+----------------------+------------------+ + |CloudOwner |ONAP-POD-01-Rail-04 |1569537472345 | + +----------------+----------------------+------------------+ + |CloudOwner |ONAP-POD-01-Rail-07 |1569537445468 | + +----------------+----------------------+------------------+ + |CloudOwner |ONAP-POD-01-Rail-05 |1569537463136 | + +----------------+----------------------+------------------+ + |CloudOwner |RegionOne |1569538337999 | + +----------------+----------------------+------------------+ diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-moco.json b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-moco.json new file mode 100644 index 00000000..c125b1d4 --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-moco.json @@ -0,0 +1,25 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-04/relationship-list/relationship", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-7286b4b1-5a57-4934-9776-d436d9f6f5aa", + "Content-Type" : "application/json" + }, + "json" : { + "related-to" : "complex", + "related-link" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "relationship-data" : [ { + "relationship-key" : "complex.physical-location-id", + "relationship-value" : "clli1" + } ] + } + }, + "response" : { + "status" : 200, + "json" : null + } +} ] \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-sample.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-sample.yaml new file mode 100644 index 00000000..614540ed --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-associate-schema-elalto-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: complex-associate +version: onap-elalto +samples: + sample1: + name: complex-associate + input: -x clli1 -y ONAP-POD-01-Rail-04 -z CloudOwner -m https://10.12.5.110:30233 -u AAI -p AAI + moco: complex-associate-schema-elalto-moco.json + output: \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-moco.json b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-moco.json new file mode 100644 index 00000000..eb884e77 --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-moco.json @@ -0,0 +1,35 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/aai/v16/cloud-infrastructure/complexes/complex/clli1", + "headers" : { + "Authorization" : "Basic QUFJOkFBSQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-21cb3e86-0e0b-4d31-b027-aa43935109e6", + "Content-Type" : "application/json" + }, + "json" : { + "physical-location-id" : "clli1", + "data-center-code" : "code1", + "complex-name" : "clli1", + "identity-url" : "example-identity-url-val-56898", + "physical-location-type" : "phy_type", + "street1" : "street1", + "street2" : "street2", + "city" : "hillsboro", + "state" : "oregon", + "postal-code" : "00000", + "country" : "USA", + "region" : "northwest", + "latitude" : "32.89948", + "longitude" : "97.045443", + "elevation" : "example-elevation-val-28399", + "lata" : "example-lata-val-28399" + } + }, + "response" : { + "status" : 201, + "json" : null + } +} ] \ No newline at end of file diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-sample.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-sample.yaml new file mode 100644 index 00000000..c7dd428a --- /dev/null +++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-create-schema-elalto-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: complex-create +version: onap-elalto +samples: + sample1: + name: complex-create + input: -j street2 -r phy_type -x clli1 -y code1 -lt 32.89948 -l northwest -i street1 -lo 97.045443 -S oregon -la example-lata-val-28399 -g hillsboro -w 00000 -z clli1 -k USA -o example-elevation-val-28399 -q example-identity-url-val-56898 -m https://10.12.5.110:30233 -u AAI -p AAI + moco: complex-create-schema-elalto-moco.json + output: \ No newline at end of file -- cgit 1.2.3-korg