diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2018-09-12 00:09:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-12 00:09:38 +0000 |
commit | 9642d2c428bc76744c324c1bea68c298070eab3b (patch) | |
tree | f9e0cafd85587b1f14268725e27bb08389c58497 /products/onap-casablanca/features/vnfsdk | |
parent | 23878941ee88186865c136c112a451afee3a13f3 (diff) | |
parent | 63b8a6679843436cab00871c43646bd66034f208 (diff) |
Merge changes I9b7a3d37,I10a859ad,Ia5eed214,I90dbd994,I41896003, ...
* changes:
Migrate VNSDK CLI to market place service
VTP: vnftest run cli
VTP: vnftest list cli
VTP: csar delete cli
VTP: csar list cli
VTP: csar show details cli
VTP: Add csar upload cli
VTP: Add VNFSDK support
OCLIP: Move to 2.0.3
Fix MSB moco samples
Fix verify to report debug info
Fix to remove invalid entries in msb OCS
Casablanca: MSB service delete
Casablanca: MSB service create
Casablanca: MSB service list
Casablanca: MSB service show
Casablanca: MSB plugin
Casablanca: catalog samples and update catalog url
Casablanca: Enable features plugin
Make beijing profile as optional
Casablanca: service catalog
Diffstat (limited to 'products/onap-casablanca/features/vnfsdk')
15 files changed, 539 insertions, 0 deletions
diff --git a/products/onap-casablanca/features/vnfsdk/pom.xml b/products/onap-casablanca/features/vnfsdk/pom.xml new file mode 100644 index 00000000..6c3ca724 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-casablanca-features</artifactId> + <version>2.0.3</version> + </parent> + + <artifactId>cli-products-onap-casablanca-features-vnfsdk</artifactId> + <name>cli/products/onap-casablanca/features/vnfsdk</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-moco.json b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-moco.json new file mode 100644 index 00000000..889ceeaa --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-moco.json @@ -0,0 +1,15 @@ +[ { + "request" : { + "method" : "delete", + "uri" : "/vnf-sdk-marketplace/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36", + "headers" : { + "Accept" : "application/json", + "Content-Type" : "application/json" + }, + "json" : null + }, + "response" : { + "status" : 200, + "json" : null + } +} ]
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-sample.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-sample.yaml new file mode 100644 index 00000000..f0e325bd --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-delete-schema-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: csar-delete +version: onap-casablanca +samples: + sample1: + name: csar-delete + input: -m http://localhost:7070/vnf-sdk-marketplace -x a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36 + moco: csar-delete-schema-moco.json + output:
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-moco.json b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-moco.json new file mode 100644 index 00000000..e0a8e30f --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-moco.json @@ -0,0 +1,31 @@ +[ { + "request" : { + "method" : "get", + "uri" : "/vnf-sdk-marketplace/onapapi/vnfsdk-marketplace/v1/PackageResource/csars", + "headers" : { + "Accept" : "application/json", + "Content-Type" : "application/json" + }, + "json" : null + }, + "response" : { + "status" : 200, + "json" : [ { + "csarId" : "a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36", + "name" : "VoLTE", + "downloadUri" : "http://127.0.0.1:8080/files/catalog-http/CSAR/ChinaMobile/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36/VoLTE/v1.0/VoLTE.csar", + "size" : "52.4 KB", + "version" : "v1.0", + "provider" : "ChinaMobile", + "type" : "CSAR", + "format" : "yaml", + "deletionPending" : false, + "createTime" : "2018-09-10 15:11:29", + "modifyTime" : "2018-09-10 15:11:29", + "shortDesc" : "descr", + "downloadCount" : 0, + "details" : "details", + "remarks" : "remarks" + } ] + } +} ]
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-sample.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-sample.yaml new file mode 100644 index 00000000..c3a3e208 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-list-schema-sample.yaml @@ -0,0 +1,16 @@ +open_cli_sample_version: 1.0 +name: csar-list +version: onap-casablanca +samples: + sample1: + name: csar-list + input: -m http://localhost:7070/vnf-sdk-marketplace + moco: csar-list-schema-moco.json + output: | + +--------------------------------------+--------+----------+----------------------------------------------------+--------------+ + |csarId |name |size |downloadUri |provider | + +--------------------------------------+--------+----------+----------------------------------------------------+--------------+ + |a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36 |VoLTE |52.4 KB |http://127.0.0.1:8080/files/catalog-http/CSAR/Chin |ChinaMobile | + | | | |aMobile/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36/VoLTE | | + | | | |/v1.0/VoLTE.csar | | + +--------------------------------------+--------+----------+----------------------------------------------------+--------------+ diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-moco.json b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-moco.json new file mode 100644 index 00000000..00d02ce0 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-moco.json @@ -0,0 +1,31 @@ +[ { + "request" : { + "method" : "get", + "uri" : "/vnf-sdk-marketplace/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36", + "headers" : { + "Accept" : "application/json", + "Content-Type" : "application/json" + }, + "json" : null + }, + "response" : { + "status" : 200, + "json" : { + "csarId" : "a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36", + "name" : "VoLTE", + "downloadUri" : "http://127.0.0.1:8080/files/catalog-http/CSAR/ChinaMobile/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36/VoLTE/v1.0/VoLTE.csar", + "size" : "52.4 KB", + "version" : "v1.0", + "provider" : "ChinaMobile", + "type" : "CSAR", + "format" : "yaml", + "deletionPending" : false, + "createTime" : "2018-09-10 15:11:29", + "modifyTime" : "2018-09-10 15:11:29", + "shortDesc" : "descr", + "downloadCount" : 0, + "details" : "details", + "remarks" : "remarks" + } + } +} ]
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-sample.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-sample.yaml new file mode 100644 index 00000000..f12488e1 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/csar-show-schema-sample.yaml @@ -0,0 +1,22 @@ +open_cli_sample_version: 1.0 +name: csar-show +version: onap-casablanca +samples: + sample1: + name: csar-show + input: -m http://localhost:7070/vnf-sdk-marketplace -x a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36 + moco: csar-show-schema-moco.json + output: | + +--------------+----------------------------------------------------+ + |property |value | + +--------------+----------------------------------------------------+ + |name |VoLTE | + +--------------+----------------------------------------------------+ + |size |52.4 KB | + +--------------+----------------------------------------------------+ + |downloadUri |http://127.0.0.1:8080/files/catalog-http/CSAR/Chin | + | |aMobile/a9f9ca7a-5dc9-48c7-9672-a63eb17c3e36/VoLTE | + | |/v1.0/VoLTE.csar | + +--------------+----------------------------------------------------+ + |provider |ChinaMobile | + +--------------+----------------------------------------------------+ diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-moco.json b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-moco.json new file mode 100644 index 00000000..42a74b12 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-moco.json @@ -0,0 +1,29 @@ +[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/vnf-sdk-marketplace/onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests",
+ "headers" : {
+ "Accept" : "application/json",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "results" : [ {
+ "schema" : "vnftest-list.yaml",
+ "ocs-version" : "1.0",
+ "sr.no" : "1",
+ "type" : "http",
+ "command" : "vnftest-list"
+ }, {
+ "schema" : "vtp-validate-csar.yaml",
+ "ocs-version" : "1.0",
+ "sr.no" : "2",
+ "type" : "basic",
+ "command" : "csar-validate"
+ } ]
+ }
+ }
+} ]
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-sample.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-sample.yaml new file mode 100644 index 00000000..dba50c03 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-sample.yaml @@ -0,0 +1,16 @@ +open_cli_sample_version: 1.0 +name: vnftest-list +version: onap-vtp +samples: + sample1: + name: vnftest-list + input: -m http://localhost:7070/vnf-sdk-marketplace + moco: vnftest-list-moco.json + output: | + +----------------+------------------------+ + |tescase |yaml | + +----------------+------------------------+ + |vnftest-list |vnftest-list.yaml | + +----------------+------------------------+ + |csar-validate |vtp-validate-csar.yaml | + +----------------+------------------------+ 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 new file mode 100644 index 00000000..7a4b1665 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml @@ -0,0 +1,54 @@ +# 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: csar-create +description: Uploads the CSARs in marketplace + + +info: + product: onap-casablanca + service: marketplace + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: csar-file + description: CSAR File path + type: binary + short_option: x + long_option: csar-file + is_optional: false + +results: + direction: landscape + attributes: + - name: csarId + description: CSAR id + scope: short + type: string +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars + method: POST + body: ${csar-file} + multipart_entity_name: file + headers: + Content-Type: multipart/form-data + success_codes: + - 200 + result_map: + csarId: $b{$.csarId}
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-delete-schema.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-delete-schema.yaml new file mode 100644 index 00000000..a05b8d1c --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-delete-schema.yaml @@ -0,0 +1,41 @@ +# 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: csar-delete +description: Delete CSARs in marketplace + +info: + product: onap-casablanca + service: marketplace + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: csar-id + description: Onap CSAR id + type: string + short_option: x + long_option: csar-id + is_optional: false + +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars/${csar-id} + method: DELETE + success_codes: + - 201 + - 200
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-list-schema.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-list-schema.yaml new file mode 100644 index 00000000..452eb35b --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-list-schema.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: csar-list +description: Lists the CSARs in marketplace + + +info: + product: onap-casablanca + service: marketplace + author: ONAP CLI Team onap-discuss@lists.onap.org + +results: + direction: landscape + attributes: + - name: csarId + description: CSAR Id + scope: short + type: string + - name: name + description: CSAR Name + scope: short + type: string + - name: size + description: CSAR size + scope: short + type: url + - name: downloadUri + description: CSAR download URL + scope: short + type: url + - name: provider + description: CSAR Provider + scope: short + type: string +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars + method: GET + success_codes: + - 201 + - 200 + result_map: + csarId: $b{$.[*].csarId} + name: $b{$.[*].name} + size: $b{$.[*].size} + downloadUri: $b{$.[*].downloadUri} + provider: $b{$.[*].provider}
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-show-schema.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-show-schema.yaml new file mode 100644 index 00000000..c124f9bd --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-show-schema.yaml @@ -0,0 +1,66 @@ +# 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: csar-show +description: Show details of the CSARs in marketplace + + +info: + product: onap-casablanca + service: marketplace + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: csar-id + description: Onap CSAR id + type: string + short_option: x + long_option: csar-id + is_optional: false + +results: + direction: portrait + attributes: + - name: name + description: CSAR Name + scope: short + type: string + - name: size + description: CSAR size + scope: short + type: url + - name: downloadUri + description: CSAR download URL + scope: short + type: url + - name: provider + description: CSAR Provider + scope: short + type: string +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars/${csar-id} + method: GET + success_codes: + - 201 + - 200 + result_map: + name: $b{$.name} + size: $b{$.size} + downloadUri: $b{$.downloadUri} + provider: $b{$.provider}
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-list.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-list.yaml new file mode 100644 index 00000000..3911fbe5 --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-list.yaml @@ -0,0 +1,47 @@ +# 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: vnftest-list +description: Lists the VNF test cases in VNF Test Platform (VTP) + +info: + product: onap-vtp + service: vtp + author: ONAP CLI Team onap-discuss@lists.onap.org + +results: + direction: landscape + attributes: + - name: tescase + description: Testcase name + scope: short + type: string + - name: yaml + description: Test case yaml + scope: short + type: string +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests + method: GET + success_codes: + - 201 + - 200 + result_map: + tescase: $b{$.results.[*].command} + yaml: $b{$.results.[*].schema}
\ No newline at end of file diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml new file mode 100644 index 00000000..1cf4586a --- /dev/null +++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml @@ -0,0 +1,58 @@ +# 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: vnftest-run +description: Runs the VNF test cases in VNF Test Platform (VTP) + +info: + product: onap-vtp + service: vtp + author: ONAP CLI Team onap-discuss@lists.onap.org +parameters: + - name: name + description: VNFtest case name + type: string + short_option: x + long_option: name + is_optional: false + - name: param + description: VNFtest case name params, and can be repeated. + type: map + short_option: y + long_option: param + is_optional: true + +results: + direction: portrait + attributes: + - name: results + description: Testcase results + scope: short + type: string + +http: + service: + auth: none + mode: direct + request: + uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests/S{name}/run + method: GET + body: ${param} + success_codes: + - 201 + - 200 + result_map: + tescase: $b{$.results.[*].command} + yaml: $b{$.results.[*].schema}
\ No newline at end of file |