add application policy schema and defaults
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/69adfb2d Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/69adfb2d Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/69adfb2d Branch: refs/heads/master Commit: 69adfb2d66bfc50b70a9f59f89aae520cef3aac0 Parents: e8aa78f Author: Dakshika Jayathilaka <[email protected]> Authored: Sun Mar 8 09:18:33 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Sun Mar 8 12:02:55 2015 +0530 ---------------------------------------------------------------------- .../applications/applicationpolicies.json | 17 +++++ .../applications/applicationpolicies.json | 69 ++++++++++++++++++++ 2 files changed, 86 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/69adfb2d/components/org.apache.stratos.manager.console/console/controllers/forms/default/applications/applicationpolicies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/applications/applicationpolicies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/applications/applicationpolicies.json new file mode 100644 index 0000000..a0c18ee --- /dev/null +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/applications/applicationpolicies.json @@ -0,0 +1,17 @@ +{ + "id": "application-policy-1", + "algorithm":"one-after-another", + "networkPartitions":[ + "network-partition-1" + ], + "properties":[ + { + "name": "key-1", + "value": "value-1" + }, + { + "name": "key-2", + "value": "value-2" + } + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/69adfb2d/components/org.apache.stratos.manager.console/console/controllers/forms/schema/applications/applicationpolicies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/applications/applicationpolicies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/applications/applicationpolicies.json new file mode 100644 index 0000000..051adab --- /dev/null +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/applications/applicationpolicies.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "root", + "type": "object", + "title": "Application Policy Definition", + "name": "Application Policy", + "options": { + "disable_properties": true, + "disable_collapse": true + }, + "properties": { + "id": { + "id": "root/id", + "type": "string" + }, + "algorithm": { + "id": "root/algorithm", + "type": "string" + }, + "networkPartitions": { + "id": "root/networkPartitions", + "type": "array", + "items": { + "id": "root/networkPartitions/0", + "type": "string" + } + }, + "properties": { + "id": "root/properties", + "type": "array", + "items": [ + { + "id": "root/properties/0", + "type": "object", + "properties": { + "name": { + "id": "root/properties/0/name", + "type": "string" + }, + "value": { + "id": "root/properties/0/value", + "type": "string" + } + } + }, + { + "id": "root/properties/1", + "type": "object", + "properties": { + "name": { + "id": "root/properties/1/name", + "type": "string" + }, + "value": { + "id": "root/properties/1/value", + "type": "string" + } + } + } + ] + } + }, + "required": [ + "id", + "algorithm", + "networkPartitions", + "properties" + ] +} \ No newline at end of file
