aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-13 16:57:14 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-13 17:07:12 +0530
commit8fb3d4a15d733625e2573b014ad54b4066209ffe (patch)
tree7cf4dea1e2614d92b3acf66bd795486af5594231
parent2cbd6a5431cee9ecaac6803bbb093a994d8915e2 (diff)
Fix VIM commands and samples
AAI has fixed the ESR to create the VIM properly and VIM commands are updated to reflect that change. CLI-5 Change-Id: Ic768846129f218979d87737fc47cab272e6c83b8 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml10
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-list-schema-1.1.yaml28
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-create-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-delete-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-list-sample-1.1.yaml24
5 files changed, 61 insertions, 17 deletions
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
index 7fd2d983..55d1604f 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
@@ -31,14 +31,20 @@ parameters:
short_option: z
long_option: vim-id
is_optional: false
+ - name: resource-version
+ description: Onap vim resource version
+ type: uuid
+ short_option: b
+ long_option: resource-version
+ is_optional: true
http:
request:
- uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud-name}/${region-name}/esr-system-info-list/esr-system-info/${vim-id}
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud-name}/${region-name}/esr-system-info-list/esr-system-info/${vim-id}?resource-version=${resource-version}
method: DELETE
success_codes:
- - 201
+ - 204
- 404
sample_response:
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-list-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-list-schema-1.1.yaml
index de133db8..2af3474d 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-list-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-list-schema-1.1.yaml
@@ -39,7 +39,7 @@ results:
type: string
- name: type
description: Onap vim type
- scope: short
+ scope: long
type: string
- name: vendor
description: Onap vim vendor
@@ -47,11 +47,11 @@ results:
type: string
- name: version
description: Onap vim version
- scope: short
+ scope: long
type: string
- name: url
description: Onap vim url
- scope: short
+ scope: long
type: string
- name: username
description: Onap vim username
@@ -77,18 +77,16 @@ http:
success_codes:
- 200
result_map:
- vim-id: $b{$.esr-system-info.[*].esr-system-info-id
- name: $b{$.esr-system-info.[*].system-name
- type: $b{$.esr-system-info.[*].type
- vendor: $b{$.esr-system-info.[*].vendor
- version: $b{$.esr-system-info.[*].version
- url: $b{$.esr-system-info.[*].service-url
- username: $b{$.esr-system-info.[*].user-name
- cloud-domain: $b{$.esr-system-info.[*].cloud-domain
- default-tenant: $b{$.esr-system-info.[*].default-tenant
- resource-version: $b{$.esr-system-info.[*].resource-version
+ vim-id: $b{$.esr-system-info.[*].esr-system-info-id}
+ name: $b{$.esr-system-info.[*].system-name}
+ type: $b{$.esr-system-info.[*].type}
+ vendor: $b{$.esr-system-info.[*].vendor}
+ version: $b{$.esr-system-info.[*].version}
+ url: $b{$.esr-system-info.[*].service-url}
+ username: $b{$.esr-system-info.[*].user-name}
+ cloud-domain: $b{$.esr-system-info.[*].cloud-domain}
+ default-tenant: $b{$.esr-system-info.[*].default-tenant}
+ resource-version: $b{$.esr-system-info.[*].resource-version}
sample_response:
body: '{esr-system-info":[{"esr-system-info-id":"example-esr-system-info-id-val-62966","system-name":"example-system-name-val-76894","type":"example-type-val-32301","vendor":"example-vendor-val-38139","version":"example-version-val-42345","service-url":"example-service-url-val-33729","user-name":"example-user-name-val-32122","password":"example-password-val-56539","system-type":"example-system-type-val-80707","protocal":"example-protocal-val-30105","ssl-cacert":"example-ssl-cacert-val-52110","ssl-insecure":true,"ip-address":"example-ip-address-val-10140","port":"example-port-val-26369","cloud-domain":"example-cloud-domain-val-22303","default-tenant":"example-default-tenant-val-26326"}]}'
-
-
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-create-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-create-sample-1.1.yaml
new file mode 100644
index 00000000..3193f6e6
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-create-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: vim-register
+version: onap-1.1
+samples:
+ sample1:
+ name: Create a vim under given cloud region
+ input: -x cloud-1 -y region-1 -z f962fa1e-d439-4b02-a122-cc38fd0da07b -b vim-1 -c OpenStack -e HW -q 1.0 -g http://locahost -i user -j password -n default -o tenant-1 -d
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-delete-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-delete-sample-1.1.yaml
new file mode 100644
index 00000000..5a1998f4
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-delete-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: vim-unregister
+version: onap-1.1
+samples:
+ sample1:
+ name: Delete the vim under given cloud region
+ input: -x cloud-1 -y region-1 -z f962fa1e-d439-4b02-a122-cc38fd0da07b -b 1505295671538
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-list-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-list-sample-1.1.yaml
new file mode 100644
index 00000000..d0e6d437
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/esr/vim/vim-list-sample-1.1.yaml
@@ -0,0 +1,24 @@
+onap_cli_sample_version: 1.0
+
+name: vim-list
+version: onap-1.1
+samples:
+ sample1:
+ name: List all vim under given cloud region
+ input: -x cloud-1 -y region-1
+ output: |
+ +--------------------------------------+--------+--------+----------------+------------------+
+ |vim-id |name |vendor |default-tenant |resource-version |
+ +--------------------------------------+--------+--------+----------------+------------------+
+ |f962fa1e-d439-4b02-a122-cc38fd0da07b |vim-1 |HW |tenant-1 |1505295671538 |
+ +--------------------------------------+--------+--------+----------------+------------------+
+ sample2:
+ name: List all vim under given cloud region with complete details
+ input: -x cloud-1 -y region-1 --long
+ output: |
+ +--------------------------------------+--------+------------+--------+----------+------------------+----------+--------------+----------------+------------------+
+ |vim-id |name |type |vendor |version |url |username |cloud-domain |default-tenant |resource-version |
+ +--------------------------------------+--------+------------+--------+----------+------------------+----------+--------------+----------------+------------------+
+ |f962fa1e-d439-4b02-a122-cc38fd0da07b |vim-1 |OpenStack |HW |1.0 |http://locahost |user |default |tenant-1 |1505295671538 |
+ +--------------------------------------+--------+------------+--------+----------+------------------+----------+--------------+----------------+------------------+
+