Add sample for microservice-show 19/20919/2
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Fri, 27 Oct 2017 05:30:17 +0000 (11:00 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Fri, 27 Oct 2017 05:47:02 +0000 (11:17 +0530)
CLI-57

Change-Id: I2e06f53a9d5aab1df05787c693a9d7df365b912c
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-moco.json [new file with mode: 0644]
plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-sample.yaml [new file with mode: 0644]
plugins/msb/src/test/resources/onap-cli-sample/msb-show-service-sample-1.1.yaml [deleted file]

diff --git a/plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-moco.json b/plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-moco.json
new file mode 100644 (file)
index 0000000..7d0863f
--- /dev/null
@@ -0,0 +1,41 @@
+[ {\r
+  "request" : {\r
+    "method" : "get",\r
+    "uri" : "/api/microservices/v1/services/test/version/v1",\r
+    "headers" : {\r
+      "Accept" : "application/json",\r
+      "Content-Type" : "application/json"\r
+    },\r
+    "json" : null\r
+  },\r
+  "response" : {\r
+    "status" : 200,\r
+    "json" : {\r
+      "serviceName" : "test",\r
+      "version" : "v1",\r
+      "url" : "/C:/Git/test",\r
+      "protocol" : "REST",\r
+      "visualRange" : "1",\r
+      "lb_policy" : "ip_hash",\r
+      "publish_port" : "",\r
+      "namespace" : "",\r
+      "network_plane_type" : "",\r
+      "host" : "",\r
+      "path" : "/C:/Git/test",\r
+      "enable_ssl" : false,\r
+      "nodes" : [ {\r
+        "ip" : "10.0.0.1",\r
+        "port" : "8080",\r
+        "checkType" : "",\r
+        "checkUrl" : "",\r
+        "ha_role" : "",\r
+        "nodeId" : "_test_10.0.0.1_8080",\r
+        "status" : "passing"\r
+      } ],\r
+      "metadata" : [ ],\r
+      "labels" : [ ],\r
+      "status" : "1",\r
+      "is_manual" : false\r
+    }\r
+  }\r
+} ]
\ No newline at end of file
diff --git a/plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-sample.yaml b/plugins/msb/src/test/resources/onap-cli-sample/microservice-show-schema-sample.yaml
new file mode 100644 (file)
index 0000000..b3f659a
--- /dev/null
@@ -0,0 +1,26 @@
+onap_cli_sample_version: 1.0
+name: microservice-show
+version: onap-1.1
+samples:
+  sample1:
+    name: microservice-show
+    input: --service-name test --service-version v1 --long
+    moco: microservice-show-schema-moco.json
+    ouput:|
+      +------------+----------------+
+      |property    |value           |
+      +------------+----------------+
+      |name        |test            |
+      +------------+----------------+
+      |version     |v1              |
+      +------------+----------------+
+      |url         |/C:/Git/test    |
+      +------------+----------------+
+      |status      |1               |
+      +------------+----------------+
+      |nodes       |10.0.0.1:8080   |
+      +------------+----------------+
+      |enable-ssl  |false           |
+      +------------+----------------+
+      |path        |/C:/Git/test    |
+      +------------+----------------+
diff --git a/plugins/msb/src/test/resources/onap-cli-sample/msb-show-service-sample-1.1.yaml b/plugins/msb/src/test/resources/onap-cli-sample/msb-show-service-sample-1.1.yaml
deleted file mode 100644 (file)
index abf1f11..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: microservice-show
-version: onap-1.1
-samples:
-    sample1:
-        name: Show a service
-        input: --service-name test-service --service-version v1 --host-url http://192.168.17.23:80
-        output: |
-          +--------------+----------+------------------------------------+--------+------------------+
-          |name          |version   |url                                 |status  |nodes             |
-          +--------------+----------+------------------------------------+--------+------------------+
-          |test-service  |v1        |/C:/Program Files/Git/api/test/v1   |1       |23.14.15.156:80   |
-          +--------------+----------+------------------------------------+--------+------------------+
\ No newline at end of file