From 26fc81f9732f6dea2de55d2a40f77f8e3489f81c Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 11:53:27 +0530 Subject: SDC vlm-create Issue-ID: CLI-122 Change-Id: Ia4bade43f7853c835560e148f4990f5d730ef8ae Signed-off-by: Kanagaraj Manickam k00365106 --- .../vlm/vlm-create-schema-casablanca-moco.json | 31 +++++++++++ .../vlm/vlm-create-schema-casablanca-sample.yaml | 9 ++++ .../vlm/vlm-create-schema-casablanca.yaml | 63 ++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json new file mode 100644 index 00000000..b885f3f0 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json @@ -0,0 +1,31 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/onboarding-api/v1.0/vendor-license-models", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-4692c777-f63e-4e50-a994-b5c208b62a9a", + "Content-Type" : "application/json" + }, + "json" : { + "vendorName" : "Huawei IN", + "description" : "Huawei Test license", + "iconRef" : "icon" + } + }, + "response" : { + "status" : 200, + "json" : { + "itemId" : "d8c1362526414b9bbe25cdd972eebf0e", + "version" : { + "id" : "7afd0daa8271470db3b556fdedf074f4", + "name" : "1.0", + "description" : "Initial version", + "status" : "Draft" + } + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..2f6384a1 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-create +version: onap-casablanca +samples: + sample1: + name: vlm-create + input: --vendor-name Huawei IN --description Huawei Test license -d + moco: vlm-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml new file mode 100644 index 00000000..74f8cbad --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml @@ -0,0 +1,63 @@ +# 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: vlm-create +description: Create License Model + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: vendor-name + description: vendor name + type: string + short_option: x + long_option: vendor-name + is_optional: false + - name: description + description: Description for License Model + type: string + short_option: y + long_option: description + is_optional: true +results: + direction: portrait + attributes: + - name: ID + description: License Model ID + scope: short + type: uuid + - name: version + description: License Model version + scope: short + type: uuid +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models + method: POST + body: '{"vendorName": "${vendor-name}", "description": "${description}", "iconRef": "icon"}' + success_codes: + - 200 + result_map: + ID: $b{$.itemId} + version: $b{$.version.id} \ No newline at end of file -- cgit 1.2.3-korg From 129949d79f3bce0c465e3133306d275565e4c162 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 12:19:56 +0530 Subject: SDC VLM entitlement pool create Issue-ID: CLI-122 Change-Id: I9d6d6d777b3c52c08d5293cfe14830e224dd5551 Signed-off-by: Kanagaraj Manickam k00365106 --- ...tlement-pool-create-schema-casablanca-moco.json | 30 ++++++++ ...ement-pool-create-schema-casablanca-sample.yaml | 9 +++ ...-entitlement-pool-create-schema-casablanca.yaml | 89 ++++++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json new file mode 100644 index 00000000..c4052efe --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json @@ -0,0 +1,30 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/entitlement-pools", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-f141aab8-be09-417a-9363-1ccf1f796280", + "Content-Type" : "application/json" + }, + "json" : { + "name" : "Test Pool", + "time" : { + "choice" : "", + "other" : "" + }, + "startDate" : "12/12/2018", + "expiryDate" : "10/11/2019", + "manufacturerReferenceNumber" : "123456" + } + }, + "response" : { + "status" : 200, + "json" : { + "value" : "3091c5af38bf4fc3b3e17371c9fecbda" + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..50fc98cb --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-entitlement-pool-create +version: onap-casablanca +samples: + sample1: + name: vlm-entitlement-pool-create + input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test Pool --description Huawei Test license --manufacture-reference-number 123456 --startDate 12/12/2018 --expiryDate 10/11/2019 -d + moco: vlm-entitlement-pool-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml new file mode 100644 index 00000000..039bb0c5 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml @@ -0,0 +1,89 @@ +# 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: vlm-entitlement-pool-create +description: Create Entitlement Pool + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: name + description: Entitlement Pool name + type: string + short_option: x + long_option: name + is_optional: false + - name: vlm-id + description: License Model ID + type: string + short_option: y + long_option: vlm-id + is_optional: false + - name: vlm-version + description: License Model version + type: string + short_option: e + long_option: vlm-version + is_optional: false + - name: description + description: Description for Entitlement Pool + type: string + short_option: z + long_option: description + is_optional: false + - name: manufacture-reference-number + description: Manufature Reference Number + type: string + short_option: k + long_option: manufacture-reference-number + is_optional: false + - name: startDate + description: License start date (MM/DD/YYYY) + type: string + short_option: l + long_option: startDate + is_optional: false + - name: expiryDate + description: License end date (MM/DD/YYYY) + type: string + short_option: g + long_option: expiryDate + is_optional: false + +results: + direction: portrait + attributes: + - name: ID + description: Entitlement Pool ID + scope: short + type: string +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/entitlement-pools + method: POST + body: '{"name":"${name}","time":{"choice":"","other":""},"startDate":"${startDate}","expiryDate":"${expiryDate}","manufacturerReferenceNumber":"${manufacture-reference-number}"}' + success_codes: + - 200 + result_map: + ID: $b{$.value} -- cgit 1.2.3-korg From c52fc567ab5081bf468390f10bcaa3f84ba6d5b7 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 12:28:28 +0530 Subject: SDC VLM key group create Issue-ID: CLI-122 Change-Id: I7bb17eeb9dc9659a6aa1c63c1129421abb615851 Signed-off-by: Kanagaraj Manickam k00365106 --- ...lm-key-group-create-schema-casablanca-moco.json | 25 +++++++ ...-key-group-create-schema-casablanca-sample.yaml | 9 +++ .../vlm-key-group-create-schema-casablanca.yaml | 78 ++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json new file mode 100644 index 00000000..d74f37b5 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json @@ -0,0 +1,25 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/license-key-groups", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-9247b01c-1707-42d5-bc83-3402d5c48501", + "Content-Type" : "application/json" + }, + "json" : { + "description" : "Huawei Test license", + "name" : "Test key group", + "type" : "Universal" + } + }, + "response" : { + "status" : 200, + "json" : { + "value" : "f3fd5a1294694f8590051c2755a4a918" + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..58a6ddb6 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-key-group-create +version: onap-casablanca +samples: + sample1: + name: vlm-key-group-create + input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test key group --description Huawei Test license -d + moco: vlm-key-group-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml new file mode 100644 index 00000000..f26a463b --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml @@ -0,0 +1,78 @@ +# 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: vlm-key-group-create +description: Create License Key Group + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: vlm-id + description: License Model Id + type: string + short_option: c + long_option: vlm-id + is_optional: false + - name: vlm-version + description: License Model version + type: string + short_option: e + long_option: vlm-version + is_optional: false + - name: name + description: name + type: string + short_option: x + long_option: name + is_optional: false + - name: type + description: type of group (Universal, unique, one-time) + type: string + short_option: y + long_option: type + is_optional: false + default_value: Universal + - name: description + description: Description for License Key Group + type: string + short_option: z + long_option: description + is_optional: true + +results: + direction: portrait + attributes: + - name: ID + description: License Model ID + scope: short + type: string +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/license-key-groups + method: POST + body: '{"description": "${description}", "name": "${name}", "type": "${type}"}' + success_codes: + - 200 + result_map: + ID: $b{$.value} \ No newline at end of file -- cgit 1.2.3-korg From 270e81ef780dbbd66c74b3de3c563a6ae85929cd Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 12:36:39 +0530 Subject: SDC VLM feature group create Issue-ID: CLI-122 Change-Id: I0de635de523b923fca2722b44ff1179431bac2de Signed-off-by: Kanagaraj Manickam k00365106 --- ...eature-group-create-schema-casablanca-moco.json | 27 +++++++ ...ture-group-create-schema-casablanca-sample.yaml | 9 +++ ...vlm-feature-group-create-schema-casablanca.yaml | 91 ++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json new file mode 100644 index 00000000..e2e4a1ad --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json @@ -0,0 +1,27 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/feature-groups", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-aec4e184-23a7-48ac-88fb-96202e971b25", + "Content-Type" : "application/json" + }, + "json" : { + "name" : "Test key group", + "addedLicenseKeyGroupsIds" : [ "f3fd5a1294694f8590051c2755a4a918" ], + "addedEntitlementPoolsIds" : [ "3091c5af38bf4fc3b3e17371c9fecbda" ], + "partNumber" : "654321", + "description" : "Huawei Test license" + } + }, + "response" : { + "status" : 200, + "json" : { + "value" : "e4ba1e16f22f44c59051dead1fa7d1cf" + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..1b21f99f --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-feature-group-create +version: onap-casablanca +samples: + sample1: + name: vlm-feature-group-create + input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test key group --description Huawei Test license --part-number 654321 --vlm-key-group-id f3fd5a1294694f8590051c2755a4a918 --vlm-entitle-pool-id 3091c5af38bf4fc3b3e17371c9fecbda -d + moco: vlm-feature-group-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml new file mode 100644 index 00000000..90a43e27 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml @@ -0,0 +1,91 @@ +# 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: vlm-feature-group-create +description: Create feature group Pool + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: name + description: Feature group name + type: string + short_option: x + long_option: name + is_optional: false + - name: vlm-id + description: License Model ID + type: string + short_option: y + long_option: vlm-id + is_optional: false + - name: vlm-version + description: License Model version + type: string + short_option: e + long_option: vlm-version + is_optional: false + - name: description + description: Description for feature group + type: string + short_option: z + long_option: description + is_optional: false + - name: vlm-key-group-id + description: VLM keygroup + type: string + short_option: g + long_option: vlm-key-group-id + is_optional: false + - name: vlm-entitle-pool-id + description: VLM Entitlement pool + type: string + short_option: b + long_option: vlm-entitle-pool-id + is_optional: false + - name: part-number + description: Part number + type: string + short_option: c + long_option: part-number + is_optional: false + +results: + direction: portrait + attributes: + - name: ID + description: Feature group ID + scope: short + type: string +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/feature-groups + method: POST + body: '{"name": "${name}", "addedLicenseKeyGroupsIds": ["${vlm-key-group-id}"], "addedEntitlementPoolsIds": ["${vlm-entitle-pool-id}"], "partNumber": "${part-number}", "description": "${description}"}' + success_codes: + - 200 + result_map: + ID: $b{$.value} + sample_response: + body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}' -- cgit 1.2.3-korg From 7cdf0658e950070cd8c290d5a62126ed6b01e52f Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 12:40:00 +0530 Subject: SDC VLM aggreement create Issue-ID: CLI-122 Change-Id: Ic701910dea78cc7af9b3bbef3d1832417528d0d4 Signed-off-by: Kanagaraj Manickam k00365106 --- ...m-aggreement-create-schema-casablanca-moco.json | 29 ++++++++ ...aggreement-create-schema-casablanca-sample.yaml | 9 +++ .../vlm-aggreement-create-schema-casablanca.yaml | 78 ++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json new file mode 100644 index 00000000..b22f95cc --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json @@ -0,0 +1,29 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/license-agreements", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-84977a57-d8dd-47a9-87fb-6171b3a02db8", + "Content-Type" : "application/json" + }, + "json" : { + "addedFeatureGroupsIds" : [ "e4ba1e16f22f44c59051dead1fa7d1cf" ], + "description" : "Huawei Test license", + "licenseTerm" : { + "choice" : "Fixed_Term", + "other" : "" + }, + "name" : "Test aggrement" + } + }, + "response" : { + "status" : 200, + "json" : { + "value" : "ddfcedccb72241a1b87c63be74896322" + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..5974d206 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-aggreement-create +version: onap-casablanca +samples: + sample1: + name: vlm-aggreement-create + input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test aggrement --description Huawei Test license --vlm-feature-group-id e4ba1e16f22f44c59051dead1fa7d1cf -d + moco: vlm-aggreement-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml new file mode 100644 index 00000000..b1a3d2a1 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml @@ -0,0 +1,78 @@ +# 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: vlm-aggreement-create +description: Create license aggreement + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: name + description: aggreement name + type: string + short_option: x + long_option: name + is_optional: false + - name: vlm-id + description: License Model ID + type: string + short_option: y + long_option: vlm-id + is_optional: false + - name: vlm-version + description: License Model version + type: string + short_option: e + long_option: vlm-version + is_optional: false + - name: description + description: Description for aggreement + type: string + short_option: z + long_option: description + is_optional: false + - name: vlm-feature-group-id + description: VLM feature group + type: string + short_option: g + long_option: vlm-feature-group-id + is_optional: false + +results: + direction: portrait + attributes: + - name: ID + description: aggreement ID + scope: short + type: string +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/license-agreements + method: POST + body: '{"addedFeatureGroupsIds": ["${vlm-feature-group-id}"], "description": "${description}", "licenseTerm": {"choice": "Fixed_Term", "other": ""}, "name": "${name}"}' + success_codes: + - 200 + result_map: + ID: $b{$.value} + sample_response: + body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}' -- cgit 1.2.3-korg From a683f45f118a41196d6a1ae096d40710d5c5a01c Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 12:45:43 +0530 Subject: SDC VLM license checkin Issue-ID: CLI-122 Change-Id: Ib099936d59af55c25fa91fb7f964a674b59ec77b Signed-off-by: Kanagaraj Manickam k00365106 --- .../vlm/vlm-submit-schema-casablanca-moco.json | 21 +++++++++ .../vlm/vlm-submit-schema-casablanca-sample.yaml | 9 ++++ .../vlm/vlm-submit-schema-casablanca.yaml | 50 ++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json new file mode 100644 index 00000000..7460914b --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json @@ -0,0 +1,21 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/actions", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-bb4ab620-1c37-48f0-9fe1-96df9838c0ed", + "Content-Type" : "application/json" + }, + "json" : { + "action" : "Submit" + } + }, + "response" : { + "status" : 200, + "json" : { } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml new file mode 100644 index 00000000..d107005d --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vlm-submit +version: onap-casablanca +samples: + sample1: + name: vlm-submit + input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 -d + moco: vlm-submit-schema-casablanca-moco.json + output: \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml new file mode 100644 index 00000000..44201671 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml @@ -0,0 +1,50 @@ +# 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: vlm-submit +description: Submit Vendor License Model + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: vlm-id + description: Onap VLM ID + type: string + short_option: x + long_option: vlm-id + is_optional: false + - name: vlm-version + description: VLM version + type: string + short_option: y + long_option: vlm-version + is_optional: false +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/actions + method: PUT + body: '{"action": "Submit"}' + success_codes: + - 201 + - 200 -- cgit 1.2.3-korg From 5a66e5e2051c98547ef94e7be8466d1d20eb4ef9 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 22 Oct 2018 14:44:54 +0530 Subject: SDC VSP creation Issue-ID: CLI-122 Change-Id: I8ac8ba5781e6a42173ae3cee0823599a647867c9 Signed-off-by: Kanagaraj Manickam k00365106 --- .../vsp/vsp-create-schema-casablanca-moco.json | 41 ++++++++ .../vsp/vsp-create-schema-casablanca-sample.yaml | 9 ++ .../vsp/vsp-create-schema-casablanca.yaml | 107 +++++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json new file mode 100644 index 00000000..7720cc9e --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json @@ -0,0 +1,41 @@ +[ { + "request" : { + "method" : "post", + "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-2d36d422-79f1-4d8e-bada-dee0e32266c2", + "Content-Type" : "application/json" + }, + "json" : { + "category" : "resourceNewCategory.generic", + "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e", + "subCategory" : "resourceNewCategory.generic.abstract", + "description" : "vFW sample vsp", + "licensingVersion" : "7afd0daa8271470db3b556fdedf074f4", + "licensingData" : { + "featureGroups" : [ "e4ba1e16f22f44c59051dead1fa7d1cf" ], + "licenseAgreement" : "ddfcedccb72241a1b87c63be74896322" + }, + "icon" : "icon", + "onboardingMethod" : "Manual", + "vendorName" : "Huawei IN", + "name" : "vFW software" + } + }, + "response" : { + "status" : 200, + "json" : { + "itemId" : "5223ac6156ce4a5fb3b33ab205f34c6e", + "version" : { + "id" : "0732aefa14634e398f16ccfdabc8ed0a", + "name" : "1.0", + "description" : "Initial version", + "status" : "Draft" + } + } + } +} ] \ No newline at end of file diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml new file mode 100644 index 00000000..a89fc626 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: vsp-create +version: onap-casablanca +samples: + sample1: + name: vsp-create + input: --vsp-name vFW software --vsp-description vFW sample vsp --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --vlm-feature-group-id e4ba1e16f22f44c59051dead1fa7d1cf --vlm-agreement-id ddfcedccb72241a1b87c63be74896322 --vlm-vendor Huawei IN -d + moco: vsp-create-schema-casablanca-moco.json + output: | diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml new file mode 100644 index 00000000..095face5 --- /dev/null +++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml @@ -0,0 +1,107 @@ +# 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-create +description: Create Vendor Software Product + +info: + product: onap-casablanca + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: vsp-name + description: Onap VSP Name + type: string + short_option: x + long_option: vsp-name + is_optional: false + - name: vsp-description + description: Description for VSP + type: string + short_option: y + long_option: vsp-description + is_optional: true + - name: vsp-category + description: Category of the VSP + type: string + long_option: vsp-category + short_option: z + is_optional: true + default_value: resourceNewCategory.generic + - name: vsp-subcategory + description: Sub Category of VSP + type: string + long_option: vsp-subcategory + short_option: b + is_optional: true + default_value: resourceNewCategory.generic.abstract + - name: vlm-version + description: License version + type: string + long_option: vlm-version + short_option: c + is_optional: true + default_value: 1.0 + - name: vlm-vendor + description: License Model vendor + type: string + long_option: vlm-vendor + short_option: e + is_optional: false + - name: vlm-id + description: License Model ID + type: string + long_option: vlm-id + short_option: g + is_optional: false + - name: vlm-agreement-id + description: License Agreement ID + type: string + long_option: vlm-agreement-id + short_option: i + is_optional: false + - name: vlm-feature-group-id + description: Feature Group ID + type: string + long_option: vlm-feature-group-id + short_option: j + is_optional: false +results: + direction: portrait + attributes: + - name: ID + description: VSP ID + scope: short + type: string + - name: version + description: VSP Model version + scope: short + type: uuid +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /onboarding-api/v1.0/vendor-software-products + method: POST + body: '{"category": "${vsp-category}", "vendorId": "${vlm-id}", "subCategory": "${vsp-subcategory}", "description": "${vsp-description}", "licensingVersion": "${vlm-version}", "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"}, "icon": "icon", "onboardingMethod": "Manual", "vendorName": "${vlm-vendor}", "name": "${vsp-name}"}' + success_codes: + - 200 + result_map: + ID: $b{$.vspId} + version: $b{$.version.id} \ No newline at end of file -- cgit 1.2.3-korg From 916e965c1b8005238c97c89dbd03f6ab29696112 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Thu, 25 Oct 2018 14:46:49 +0530 Subject: SDC VSP list command Issue-ID: CLI-122 Change-Id: I9861d1212b1fc8df0f5b001e5b62157ed70433d3 Signed-off-by: Kanagaraj Manickam k00365106 --- .../vsp/vsp-list-schema-casablanca-moco.json | 58 +++++++++++++++++ .../vsp/vsp-list-schema-casablanca-sample.yaml | 20 ++++++ .../vsp/vsp-list-schema-casablanca.yaml | 73 ++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml create mode 100644 products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml 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} -- cgit 1.2.3-korg From e644f7fc1173b4b0ebe66648f4f26f6b6c46d573 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Thu, 15 Nov 2018 16:21:59 +0530 Subject: Fix csar-create to upload csar properly Issue-ID: VNFSDK-334 Change-Id: Ica13dd1313684df759920d83e1d8416deb1de2d6 Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/resources/open-cli-schema/csar-create-schema.yaml | 2 -- profiles/http/pom.xml | 2 +- .../org/onap/cli/fw/http/connect/OnapHttpConnection.java | 14 ++++++++------ .../org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml index 64b390e2..d1728745 100644 --- a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml @@ -46,8 +46,6 @@ http: method: POST body: ${csar-file} multipart_entity_name: file - headers: - Content-Type: multipart/form-data success_codes: - 200 result_map: diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml index d8ea2b49..ac2f089f 100644 --- a/profiles/http/pom.xml +++ b/profiles/http/pom.xml @@ -45,7 +45,7 @@ org.apache.httpcomponents httpmime - 4.0.1 + 4.3.5 compile diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java index b21c2575..b86ef26b 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java @@ -54,9 +54,9 @@ import org.apache.http.conn.ssl.AllowAllHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.X509HostnameVerifier; import org.apache.http.cookie.Cookie; +import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; -import org.apache.http.entity.mime.MultipartEntity; -import org.apache.http.entity.mime.content.FileBody; +import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.impl.client.BasicCookieStore; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.LaxRedirectStrategy; @@ -365,10 +365,12 @@ public class OnapHttpConnection { } private HttpEntity getMultipartEntity(HttpInput input) { - FileBody fileBody = new FileBody(new File(input.getBody().trim())); - MultipartEntity multipartEntity = new MultipartEntity(); - String fileName = input.getMultipartEntityName() != "" ? input.getMultipartEntityName() : "upload"; - multipartEntity.addPart(fileName, fileBody); + String fileTag = input.getMultipartEntityName() != "" ? input.getMultipartEntityName() : "file"; + File file = new File(input.getBody().trim()); + HttpEntity multipartEntity = MultipartEntityBuilder + .create() + .addBinaryBody(fileTag, file, ContentType.create("application/octet-stream"), file.getName()) + .build(); return multipartEntity; } diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java index ed415335..a0c96cad 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java @@ -73,6 +73,7 @@ public class OnapCommandHttpUtils { break; } } + inp.setMultipartEntityName(input.getMultipartEntityName()); inp.setBody(OnapCommandUtils.replaceLineFromInputParameters(input.getBody(), params)); inp.setUri(OnapCommandUtils.replaceLineFromInputParameters(input.getUri(), params)); inp.setMethod(input.getMethod().toLowerCase()); -- cgit 1.2.3-korg