summaryrefslogtreecommitdiffstats
path: root/products/onap-dublin
diff options
context:
space:
mode:
authorItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-13 23:00:04 +0000
committerItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-13 23:14:03 +0000
commitd8850415efbe66463903ff5a17e3e6cc60011974 (patch)
treec7edb9fb45719654181f13cd7056ffac34b76348 /products/onap-dublin
parent65d9d65c6e3bf9f4f5590a3ba3d9234b63c04596 (diff)
Updated cloud-create command
Change-Id: I3524e683f4b93b32bd3695bf2aa03893bef8c655 Issue-ID: CLI-148 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
Diffstat (limited to 'products/onap-dublin')
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-moco.json42
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-create-schema-dublin-sample.yaml22
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-dublin.yaml147
3 files changed, 204 insertions, 7 deletions
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-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