aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-beijing
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-19 16:28:14 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-19 16:28:14 +0530
commitd2037619ed0aef967cae04d2dba1ff997a9c6827 (patch)
tree8d63cd20689352e26d98d39e44157c725c81bc06 /products/onap-beijing
parent37747bb67fb6db7a0b620ff0e82b381cc5aefe11 (diff)
CLI: vsp-create beijing
Change-Id: Ie84b711d32ace99e3738b75504e5fecb271e8c85 Issue-ID: CLI-100 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'products/onap-beijing')
-rw-r--r--products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-moco.json38
-rw-r--r--products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-sample.yaml28
-rw-r--r--products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-beijing.yaml104
3 files changed, 170 insertions, 0 deletions
diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-moco.json b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-moco.json
new file mode 100644
index 00000000..0a9b516c
--- /dev/null
+++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-moco.json
@@ -0,0 +1,38 @@
+[ {
+ "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-d12d57b4-de08-481f-9235-f524e3b7aa99",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "category" : "resourceNewCategory.generic",
+ "vendorId" : "cf2d907d998e44698ce3b4cded5f66a7",
+ "subCategory" : "resourceNewCategory.generic.abstract",
+ "description" : "VLB created from CLI",
+ "licensingVersion" : {
+ "id" : "2.0",
+ "label" : "2.0"
+ },
+ "licensingData" : {
+ "featureGroups" : [ "3a2fb75b52a54e9c8093e7c154210f9e" ],
+ "licenseAgreement" : "77e151d0503b45ecb7e40f5f5f1a887e"
+ },
+ "icon" : "icon",
+ "onboardingMethod" : "NetworkPackage",
+ "vendorName" : "Kanag-cli",
+ "name" : "kanag-cli-VLB"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "vspId" : "f19cad8343794e93acb9cda2e4126281"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-sample.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-sample.yaml
new file mode 100644
index 00000000..8b0cbad6
--- /dev/null
+++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-beijing-sample.yaml
@@ -0,0 +1,28 @@
+# 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_sample_version: 1.0
+name: vsp-create
+version: onap-beijing
+samples:
+ sample1:
+ name: vsp-create
+ input: --vsp-name kanag-cli-VLB --vsp-description VLB created from CLI --vlm-agreement-id 77e151d0503b45ecb7e40f5f5f1a887e --vlm-version 2.0 --vlm-feature-group-id 3a2fb75b52a54e9c8093e7c154210f9e --vlm-id cf2d907d998e44698ce3b4cded5f66a7 --vlm-vendor Kanag-cli
+ moco: vsp-create-schema-1.1-moco.json
+ output: |
+ +----------+----------------------------------+
+ |property |value |
+ +----------+----------------------------------+
+ |ID |f19cad8343794e93acb9cda2e4126281 |
+ +----------+----------------------------------+
diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-beijing.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-beijing.yaml
new file mode 100644
index 00000000..2dc6c551
--- /dev/null
+++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-beijing.yaml
@@ -0,0 +1,104 @@
+# 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-beijing
+ 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
+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": {"id": "${vlm-version}", "label": "${vlm-version}"}, "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"}, "icon": "icon", "onboardingMethod": "NetworkPackage", "vendorName": "${vlm-vendor}", "name": "${vsp-name}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.vspId}
+ sample_response:
+ body: '{"vspId":"2DEB6CB4B082415BB7A697C9CD1273BA"}'