From 28719311ea4fb6b53c59e0f387ef76a652f7b00f Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 11 Sep 2018 14:30:01 +0530 Subject: VTP: vnftest list cli Issue-ID: VNFSDK-304 Change-Id: Ia5eed214aef4a7a7e5649d0b5c5c17b80634ecca Signed-off-by: Kanagaraj Manickam k00365106 --- .../open-cli-sample/vnftest-list-moco.json | 29 +++++++++++++ .../open-cli-sample/vnftest-list-sample.yaml | 16 ++++++++ .../resources/open-cli-schema/vnftest-list.yaml | 47 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-moco.json create mode 100644 products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-sample.yaml create mode 100644 products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-list.yaml (limited to 'products/onap-casablanca') 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/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 -- cgit 1.2.3-korg