From 0d4c19a9389a933cf5b5e83173f97f8cd72b7f5e Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Thu, 14 Sep 2017 13:06:21 -0400 Subject: Merge in changes there were made since seeding * Fix DR config keys issue * Add data format generate command * Improve error messaging * Add in support for inputs otherwise known as "sourced at deployment" Change-Id: I9d97c30aeba587315d7fd1a18c38f71d8199d42b Issue-Id: DCAEGEN2-91 Signed-off-by: Michael Hwang --- component-json-schemas/component-spec-schema.json | 5 +++ component-json-schemas/dmaap-schema.json | 51 ++++++++++++++++++++++ .../tests/dmaap-mr-bad-extra.json | 12 +++++ .../tests/dmaap-mr-bad-missing.json | 10 +++++ component-json-schemas/tests/dmaap-mr-good.json | 11 +++++ 5 files changed, 89 insertions(+) create mode 100644 component-json-schemas/dmaap-schema.json create mode 100644 component-json-schemas/tests/dmaap-mr-bad-extra.json create mode 100644 component-json-schemas/tests/dmaap-mr-bad-missing.json create mode 100644 component-json-schemas/tests/dmaap-mr-good.json (limited to 'component-json-schemas') diff --git a/component-json-schemas/component-spec-schema.json b/component-json-schemas/component-spec-schema.json index 690cc96..27d0403 100644 --- a/component-json-schemas/component-spec-schema.json +++ b/component-json-schemas/component-spec-schema.json @@ -219,6 +219,11 @@ "type": "boolean", "default": false }, + "sourced_at_deployment": { + "description": "An optional key that declares a parameter's value to be assigned at deployment time (true). Default is false.", + "type": "boolean", + "default": false + }, "policy_schema" :{ "type": "array", "uniqueItems": true, diff --git a/component-json-schemas/dmaap-schema.json b/component-json-schemas/dmaap-schema.json new file mode 100644 index 0000000..e6745f7 --- /dev/null +++ b/component-json-schemas/dmaap-schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Schema for dmaap inputs", + "type": "object", + "oneOf": [ + { "$ref": "#/definitions/message_router" } + ], + "definitions": { + "message_router": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["message_router"] + }, + "aaf_username": { + "type": "string" + }, + "aaf_password": { + "type": "string" + }, + "dmaap_info": { + "type": "object", + "properties": { + "client_role": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "location": { + "type": "string" + }, + "topic_url": { + "type": "string" + } + }, + "required": [ + "topic_url" + ], + "additionalProperties": false + } + }, + "required": [ + "type", + "dmaap_info" + ], + "additionalProperties": false + } + } +} diff --git a/component-json-schemas/tests/dmaap-mr-bad-extra.json b/component-json-schemas/tests/dmaap-mr-bad-extra.json new file mode 100644 index 0000000..e1821d5 --- /dev/null +++ b/component-json-schemas/tests/dmaap-mr-bad-extra.json @@ -0,0 +1,12 @@ +{ + "type": "message_router", + "aaf_username": "foo3", + "aaf_password": "bar3", + "something_else": "boo", + "dmaap_info":{ + "client_role":"some.dcae.member", + "client_id":"123456", + "location":"mtc5", + "topic_url":"https://message-router-url/some-topic" + } +} diff --git a/component-json-schemas/tests/dmaap-mr-bad-missing.json b/component-json-schemas/tests/dmaap-mr-bad-missing.json new file mode 100644 index 0000000..9151032 --- /dev/null +++ b/component-json-schemas/tests/dmaap-mr-bad-missing.json @@ -0,0 +1,10 @@ +{ + "type": "message_router", + "aaf_username": "foo3", + "aaf_password": "bar3", + "dmaap_info":{ + "client_role":"some.dcae.member", + "client_id":"123456", + "location":"mtc5" + } +} diff --git a/component-json-schemas/tests/dmaap-mr-good.json b/component-json-schemas/tests/dmaap-mr-good.json new file mode 100644 index 0000000..d3e8dda --- /dev/null +++ b/component-json-schemas/tests/dmaap-mr-good.json @@ -0,0 +1,11 @@ +{ + "type": "message_router", + "aaf_username": "foo3", + "aaf_password": "bar3", + "dmaap_info":{ + "client_role":"some.dcae.member", + "client_id":"123456", + "location":"mtc5", + "topic_url":"https://message-router-url/some-topic" + } +} -- cgit 1.2.3-korg