Commit 564be458 authored by Julien Muchembled's avatar Julien Muchembled

ERP5/NEO: fix a few errors in json schemas + some clean up

parent c7f104fb
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"], "required": ["tcpv4-port"],
"properties": { "properties": {
"tcpv4-port": { "tcpv4-port": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"description": "Parameters to instantiate ERP5", "description": "Parameters to instantiate ERP5",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"sla-dict": { "sla-dict": {
"description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references.", "description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references.",
"patternProperties": { "additionalProperties": {
".": { "type": "array",
"type": "array", "items": { "type": "string" },
"items": { "type": "string" }, "uniqueItems": true
"uniqueItems": true
}
}, },
"type": "object" "type": "object"
}, },
...@@ -50,11 +47,9 @@ ...@@ -50,11 +47,9 @@
"hostalias-dict": { "hostalias-dict": {
"description": "Hostname-to-hostname mapping", "description": "Hostname-to-hostname mapping",
"default": {}, "default": {},
"patternProperties": { "additionalProperties": {
".*": { "description": "A hostname to which current entry will resolve",
"description": "A hostname to which current entry will resolve", "type": "string"
"type": "string"
}
}, },
"type": "object" "type": "object"
}, },
...@@ -218,25 +213,17 @@ ...@@ -218,25 +213,17 @@
}, },
"server": { "server": {
"description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB.", "description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB.",
"oneOf": [ "anyOf": [
{"$ref": "./instance-zeo-schema.json#properties"} {"$ref": "./instance-zeo-schema.json"}
] ]
}, },
"storage-dict": { "storage-dict": {
"description": "Storage configuration. For NEO, 'logfile' is automatically set (see http://git.erp5.org/gitweb/neoppod.git/blob/HEAD:/neo/client/component.xml for other settings).", "description": "Storage configuration. For NEO, 'logfile' is automatically set (see http://git.erp5.org/gitweb/neoppod.git/blob/HEAD:/neo/client/component.xml for other settings).",
"patternProperties": { "additionalProperties": {"type": "string"},
".": {
"type": "string"
}
},
"type": "object" "type": "object"
} }
}, },
"patternProperties": { "additionalProperties": {"type": "string"},
".": {
"type": "string"
}
},
"type": "object" "type": "object"
}, },
"type": "array" "type": "array"
......
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"], "required": ["tcpv4-port"],
"properties": { "properties": {
"tcpv4-port": { "tcpv4-port": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"], "required": ["tcpv4-port"],
"properties": { "properties": {
"tcpv4-port": { "tcpv4-port": {
......
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#", "additionalProperties": false,
"properties": { "properties": {
"backup": { "backup": {
"description": "'%(backup)s' is expanded to partition's ZODB backup path (typically 'srv/backup/zodb'), and %(name)s with the export id", "description": "'%(backup)s' is expanded to partition's ZODB backup path (typically 'srv/backup/zodb'), and %(name)s with the export id",
...@@ -18,5 +18,6 @@ ...@@ -18,5 +18,6 @@
"default": "%(zodb)s/%(name)s.fs", "default": "%(zodb)s/%(name)s.fs",
"type": "string" "type": "string"
} }
} },
"type": "object"
} }
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"description": "Parameters to instantiate a NEO cluster. See https://git.erp5.org/gitweb/neoppod.git/blob/HEAD:/neo.conf?js=1 for more information.", "description": "Parameters to instantiate a NEO cluster. See https://git.erp5.org/gitweb/neoppod.git/blob/HEAD:/neo.conf?js=1 for more information.",
"additionalProperties": false, "additionalProperties": false,
"required": ["cluster"], "required": ["cluster"],
...@@ -29,12 +28,10 @@ ...@@ -29,12 +28,10 @@
}, },
"sla-dict": { "sla-dict": {
"description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references.", "description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references.",
"patternProperties": { "additionalProperties": {
".": { "type": "array",
"type": "array", "items": { "type": "string" },
"items": { "type": "string" }, "uniqueItems": true
"uniqueItems": true
}
}, },
"type": "object" "type": "object"
}, },
...@@ -59,11 +56,9 @@ ...@@ -59,11 +56,9 @@
"type": "boolean" "type": "boolean"
} }
}, },
"patternProperties": { "additionalProperties": {
".": { "description": "To configure important parameters like innodb_buffer_pool_size, tokudb_cache_size, etc.",
"description": "To configure important parameters like innodb_buffer_pool_size, tokudb_cache_size, etc.", "type": "string"
"type": "string"
}
}, },
"type": "object" "type": "object"
}, },
...@@ -71,7 +66,8 @@ ...@@ -71,7 +66,8 @@
"description": "Configures storage engine, currently only InnoDB and TokuDB are supported. Defaults to NEO's default.", "description": "Configures storage engine, currently only InnoDB and TokuDB are supported. Defaults to NEO's default.",
"type": "string" "type": "string"
} }
} },
"type": "object"
}, },
"type": "array" "type": "array"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment