aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/msb/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-27 10:58:53 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-27 11:16:39 +0530
commit9e1077bc1cd11ef8bb38a33b3db36003ebef1a03 (patch)
treed404766fe3a6b3623d0a6c630a188f85e6720ec0 /plugins/msb/src
parent154c21167c5edbe0f0c0143113577a2fb93f2ec2 (diff)
Add sample for microservice-create
CLI-57 Change-Id: I755eb53f68680ccc0aaa0b2952a7202ee817d522 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'plugins/msb/src')
-rw-r--r--plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-moco.json55
-rw-r--r--plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-sample.yaml20
-rw-r--r--plugins/msb/src/test/resources/onap-cli-sample/msb-create-service-sample-1.1.yaml20
3 files changed, 75 insertions, 20 deletions
diff --git a/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-moco.json b/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-moco.json
new file mode 100644
index 00000000..d2b703d0
--- /dev/null
+++ b/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-moco.json
@@ -0,0 +1,55 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/api/microservices/v1/services",
+ "headers" : {
+ "Accept" : "application/json",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "serviceName" : "test",
+ "version" : "v1",
+ "path" : "/test",
+ "url" : "/test",
+ "protocol" : "REST",
+ "enable_ssl" : "",
+ "visualRange" : "1",
+ "lb_policy" : "ip_hash",
+ "nodes" : [ {
+ "ip" : "10.0.0.1",
+ "port" : "8080",
+ "ttl" : 0
+ } ]
+ }
+ },
+ "response" : {
+ "status" : 201,
+ "json" : {
+ "serviceName" : "test",
+ "version" : "v1",
+ "url" : "/test",
+ "protocol" : "REST",
+ "visualRange" : "1",
+ "lb_policy" : "ip_hash",
+ "publish_port" : "",
+ "namespace" : "",
+ "network_plane_type" : "",
+ "host" : "",
+ "path" : "/test",
+ "enable_ssl" : false,
+ "nodes" : [ {
+ "ip" : "10.0.0.1",
+ "port" : "8080",
+ "checkType" : "",
+ "checkUrl" : "",
+ "ha_role" : "",
+ "nodeId" : "_test_10.0.0.1_8080",
+ "status" : "passing"
+ } ],
+ "metadata" : [ ],
+ "labels" : [ ],
+ "status" : "1",
+ "is_manual" : false
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-sample.yaml b/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-sample.yaml
new file mode 100644
index 00000000..f11b3bfb
--- /dev/null
+++ b/plugins/msb/src/test/resources/onap-cli-sample/microservice-create-schema-sample.yaml
@@ -0,0 +1,20 @@
+onap_cli_sample_version: 1.0
+name: microservice-create
+version: onap-1.1
+samples:
+ sample1:
+ name: microservice-create
+ input: --service-name test --service-version v1 --service-url C:/Git/test --path C:/Git/test 10.0.0.1 8080
+ moco: microservice-create-schema-moco.json
+ ouput:|
+ +----------+--------------+
+ |property |value |
+ +----------+--------------+
+ |name |test |
+ +----------+--------------+
+ |version |v1 |
+ +----------+--------------+
+ |url |/test |
+ +----------+--------------+
+ |status |1 |
+ +----------+--------------+
diff --git a/plugins/msb/src/test/resources/onap-cli-sample/msb-create-service-sample-1.1.yaml b/plugins/msb/src/test/resources/onap-cli-sample/msb-create-service-sample-1.1.yaml
deleted file mode 100644
index 115e1d9f..00000000
--- a/plugins/msb/src/test/resources/onap-cli-sample/msb-create-service-sample-1.1.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: microservice-create
-version: onap-1.1
-samples:
- sample1:
- name: Create a service
- input: --service-name test-service --service-version v1 --service-url /api/test/v1 --host-url http://192.168.17.23:80 23.14.15.156 80
- output: |
- +----------+------------------------------------+
- |property |value |
- +----------+------------------------------------+
- |name |test-service |
- +----------+------------------------------------+
- |version |v1 |
- +----------+------------------------------------+
- |url |/C:/Program Files/Git/api/test/v1 |
- +----------+------------------------------------+
- |status |1 |
- +----------+------------------------------------+ \ No newline at end of file