From b86b42713a1fbfb1929bd5019aed7e5275b78d64 Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Thu, 24 Aug 2017 12:18:43 -0400 Subject: Add dcae-cli and component-json-schemas projects Change-Id: I2d920da7902bb5c1faf3d66173d62c942e9a19e9 Issue-Id: DCAEGEN2-50 Signed-off-by: Michael Hwang --- .../tests/component-spec-cdap.json | 78 +++++++++++++++ .../tests/component-spec-docker.json | 110 +++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 component-json-schemas/tests/component-spec-cdap.json create mode 100644 component-json-schemas/tests/component-spec-docker.json (limited to 'component-json-schemas/tests') diff --git a/component-json-schemas/tests/component-spec-cdap.json b/component-json-schemas/tests/component-spec-cdap.json new file mode 100644 index 0000000..a8e3544 --- /dev/null +++ b/component-json-schemas/tests/component-spec-cdap.json @@ -0,0 +1,78 @@ +{ + "self":{ + "name":"cdap.helloworld.endnode", + "version":"0.8.0", + "description":"cdap test component", + "component_type":"cdap" + }, + "streams":{ + "subscribes": [ + { + "format": "some.format", + "version": "5.0.0", + "route": "/yay", + "type": "http" + }, + { + "format": "some.format", + "version": "5.0.0", + "config_key": "foo-sub", + "type": "message router" + }], + "publishes": [{ + "format": "std.empty", + "version": "1.0.6", + "config_key": "stream_publish_example", + "type": "message_router" + }] + }, + "services":{ + "calls": [], + "provides":[ + { + "request":{ + "format":"std.empty", + "version":"1.0.6" + }, + "response":{ + "format":"std.empty", + "version":"1.0.6" + }, + "service_name":"Greeting", + "service_endpoint":"greet", + "verb":"GET" + } + ] + }, + "parameters": { + "app_config" : [ + {"name" : "some_param", + "description" : "some desc", + "value" : "some_value", + "type": "string"} + ], + "app_preferences" : [ + {"name" : "some_param2", + "description" : "some desc2", + "value" : true, + "type": "boolean"} + ], + "program_preferences" : [{"program_type" : "flows", "program_id" : "WhoFlow", "program_pref" : [{"name" : "some_param3","description" : "some desc3", "value" : "some_value3", "type": "number"}]}] + }, + "auxilary": { + "streamname":"who", + "artifact_name" : "HelloWorld", + "artifact_version" : "3.4.3", + "programs" : [ + {"program_type" : "flows", "program_id" : "WhoFlow"}, + {"program_type" : "services", "program_id" : "Greeting"} + ], + "namespace" : "hw" + }, + "artifacts": [ + { + "uri": "some jar url", + "type": "jar" + } + ] +} diff --git a/component-json-schemas/tests/component-spec-docker.json b/component-json-schemas/tests/component-spec-docker.json new file mode 100644 index 0000000..34458d5 --- /dev/null +++ b/component-json-schemas/tests/component-spec-docker.json @@ -0,0 +1,110 @@ +{ + "self": { + "version": "0.5.0", + "name": "sandbox.platform.laika", + "description": "Web service used as a stand-alone test DCAE service component", + "component_type": "docker" + }, + "streams": { + "subscribes": [], + "publishes": [ + { + "format": "some.format", + "version": "1.0.0", + "config_key": "pub-foo", + "type": "message router" + }, + { + "format": "some.format", + "version": "1.0.0", + "config_key": "pub-foo", + "type": "http" + } + ] + }, + "services": { + "calls": [], + "provides": [ + { + "route": "/rollcall", + "verb": "GET", + "request": { + "format": "sandbox.platform.any", + "version": "0.1.0" + }, + "response": { + "format": "sandbox.platform.laika.rollcall.response", + "version": "0.1.0" + } + }, + { + "route": "/identity", + "verb": "POST", + "request": { + "format": "sandbox.platform.laika.identity.request", + "version": "0.1.0" + }, + "response": { + "format": "sandbox.platform.laika.identity.response", + "version": "0.1.0" + } + }, + { + "route": "/health", + "verb": "GET", + "request": { + "format": "sandbox.platform.any", + "version": "0.1.0" + }, + "response": { + "format": "sandbox.platform.laika.health", + "version": "0.1.0" + } + } + ] + }, + "parameters": [ + { + "name": "threshold", + "description": "Some fake threshold", + "type": "number", + "value": 2000 + }, + { + "name": "some-target-number", + "description": "Some fake target", + "type": "number", + "value": 10000, + "constraints": [ + { + "greater_or_equal": 1 + }, + { + "less_than": 100000 + }] + }, + { + "name": "magic-word", + "description": "Some magic word", + "type": "string", + "value": "requirements", + "constraints": [ + { + "valid_values": ["rally", "user story"] + }] + } + ], + "auxilary": { + "healthcheck": { + "type": "http", + "endpoint": "/foo" + }, + "ports": ["8080:8080"] + }, + "artifacts": [ + { + "uri": "some docker image path", + "type": "docker image" + } + ] +} -- cgit 1.2.3-korg