diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-10-25 14:46:49 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-10-25 14:46:49 +0530 |
commit | 916e965c1b8005238c97c89dbd03f6ab29696112 (patch) | |
tree | a5337ea909fc6610894673ae25af0caa65719c95 | |
parent | 5a66e5e2051c98547ef94e7be8466d1d20eb4ef9 (diff) |
SDC VSP list command
Issue-ID: CLI-122
Change-Id: I9861d1212b1fc8df0f5b001e5b62157ed70433d3
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
3 files changed, 151 insertions, 0 deletions
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json new file mode 100644 index 00000000..f66bcdb1 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json @@ -0,0 +1,58 @@ +[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/onboarding-api/v1.0/vendor-software-products",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-373a1f99-8c3a-43b8-8b27-7d2d75dc60bb",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "listCount" : 4,
+ "results" : [ {
+ "name" : "vFW software",
+ "description" : "vFW sample vsp",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "5223ac6156ce4a5fb3b33ab205f34c6e",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test123",
+ "description" : "test",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "83f9c5d846044f81b3b94e15aaaafb0b",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test",
+ "description" : "test",
+ "vendorName" : "hw",
+ "vendorId" : "efd7a4cece974be7ad8d7798b17f9621",
+ "onboardingMethod" : "NetworkPackage",
+ "id" : "3cf5d987d1d444be8b172b3744bcbe0c",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test1",
+ "description" : "test",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "3ee1964d46834c0eaa4f9909bf40b961",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ } ]
+ }
+ }
+} ]
\ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml new file mode 100644 index 00000000..50614092 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml @@ -0,0 +1,20 @@ +open_cli_sample_version: 1.0 +name: vsp-list +version: onap-casablanca +samples: + sample1: + name: vsp-list + input: -d + moco: vsp-list-schema-casablanca-moco.json + output: | + +----------------------------------+--------------+----------+--------+ + |ID |name |version |status | + +----------------------------------+--------------+----------+--------+ + |5223ac6156ce4a5fb3b33ab205f34c6e |vFW software | |ACTIVE | + +----------------------------------+--------------+----------+--------+ + |83f9c5d846044f81b3b94e15aaaafb0b |test123 | |ACTIVE | + +----------------------------------+--------------+----------+--------+ + |3cf5d987d1d444be8b172b3744bcbe0c |test | |ACTIVE | + +----------------------------------+--------------+----------+--------+ + |3ee1964d46834c0eaa4f9909bf40b961 |test1 | |ACTIVE | + +----------------------------------+--------------+----------+--------+ diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml new file mode 100644 index 00000000..95d62c9e --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml @@ -0,0 +1,73 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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: vsp-list +description: List of the Vendor Software Products + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + +results: + direction: landscape + attributes: + - name: ID + description: VSP ID + scope: short + type: string + - name: name + description: VSP Name + scope: short + type: string + - name: vendor-name + description: Vendor name + scope: long + type: string + - name: version + description: Version + scope: short + type: string + - name: status + description: status + scope: short + type: string + - name: license-id + description: license aggreement + scope: long + type: string + - name: license-version + description: license version + scope: long + type: string +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-software-products + method: GET + success_codes: + - 200 + result_map: + ID: $b{results.[*].id} + name: $b{results.[*].name} + vendor-name: $b{results.[*].vendorName} + version: $b{results.[*].version.id} + status: $b{results.[*].status} + license-id: $b{results.[*].licensingData.licenseAgreement} + license-version: $b{results.[*].licensingVersion.id} |