VTP: vnftest list cli 59/65759/2
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Tue, 11 Sep 2018 09:00:01 +0000 (14:30 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Tue, 11 Sep 2018 09:42:38 +0000 (15:12 +0530)
Issue-ID: VNFSDK-304

Change-Id: Ia5eed214aef4a7a7e5649d0b5c5c17b80634ecca
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-moco.json [new file with mode: 0644]
products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-sample/vnftest-list-sample.yaml [new file with mode: 0644]
products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-list.yaml [new file with mode: 0644]

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 (file)
index 0000000..42a74b1
--- /dev/null
@@ -0,0 +1,29 @@
+[ {\r
+  "request" : {\r
+    "method" : "get",\r
+    "uri" : "/vnf-sdk-marketplace/onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests",\r
+    "headers" : {\r
+      "Accept" : "application/json",\r
+      "Content-Type" : "application/json"\r
+    },\r
+    "json" : null\r
+  },\r
+  "response" : {\r
+    "status" : 200,\r
+    "json" : {\r
+      "results" : [ {\r
+        "schema" : "vnftest-list.yaml",\r
+        "ocs-version" : "1.0",\r
+        "sr.no" : "1",\r
+        "type" : "http",\r
+        "command" : "vnftest-list"\r
+      }, {\r
+        "schema" : "vtp-validate-csar.yaml",\r
+        "ocs-version" : "1.0",\r
+        "sr.no" : "2",\r
+        "type" : "basic",\r
+        "command" : "csar-validate"\r
+      } ]\r
+    }\r
+  }\r
+} ]
\ 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 (file)
index 0000000..dba50c0
--- /dev/null
@@ -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 (file)
index 0000000..3911fbe
--- /dev/null
@@ -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