Commit 6e62c95b authored by Jérome Perrin's avatar Jérome Perrin

Improvements to ERP5 instance json schemas

- make profiles for software-types "self contained"
- add default ports ( because port is marked required )

/reviewed-on !664
parents dc777bc1 92d29865
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
"additionalProperties": false, "additionalProperties": false,
"definitions": { "definitions": {
"tcpv4port": { "tcpv4port": {
"minimum": 0, "$ref": "./schemas-definitions.json#/tcpv4port"
"maximum": 65535,
"type": "integer"
} }
}, },
"properties": { "properties": {
...@@ -194,16 +192,34 @@ ...@@ -194,16 +192,34 @@
}, },
"kumofs": { "kumofs": {
"description": "Persistent memcached service", "description": "Persistent memcached service",
"additionalProperties": { "allOf": [
{
"$ref": "./instance-kumofs-schema.json" "$ref": "./instance-kumofs-schema.json"
}, },
{
"properties": {
"tcpv4-port": {
"default": 2000
}
}
}
],
"type": "object" "type": "object"
}, },
"memcached": { "memcached": {
"description": "Volatile memcached service", "description": "Volatile memcached service",
"additionalProperties": { "allOf": [
{
"$ref": "./instance-kumofs-schema.json" "$ref": "./instance-kumofs-schema.json"
}, },
{
"properties": {
"tcpv4-port": {
"default": 2010
}
}
}
],
"type": "object" "type": "object"
}, },
"cloudooo-url": { "cloudooo-url": {
...@@ -218,16 +234,34 @@ ...@@ -218,16 +234,34 @@
}, },
"smtp": { "smtp": {
"description": "Mail queuing and relay service", "description": "Mail queuing and relay service",
"additionalProperties": { "allOf": [
{
"$ref": "./instance-smtp-schema.json" "$ref": "./instance-smtp-schema.json"
}, },
{
"properties": {
"tcpv4-port": {
"default": 2010
}
}
}
],
"type": "object" "type": "object"
}, },
"mariadb": { "mariadb": {
"description": "Relational database service", "description": "Relational database service",
"additionalProperties": { "allOf": [
{
"$ref": "./instance-mariadb-schema.json" "$ref": "./instance-mariadb-schema.json"
}, },
{
"properties": {
"tcpv4-port": {
"default": 2099
}
}
}
],
"type": "object" "type": "object"
}, },
"zodb-zeo": { "zodb-zeo": {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"tcpv4-port": { "tcpv4-port": {
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/tcpv4port" "$ref": "./schemas-definitions.json#/tcpv4port"
}, },
{ {
"description": "Start allocating ports at this value, going upward" "description": "Start allocating ports at this value, going upward"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"tcpv4-port": { "tcpv4-port": {
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/tcpv4port" "$ref": "./schemas-definitions.json#/tcpv4port"
}, },
{ {
"description": "Start allocating ports at this value, going downward" "description": "Start allocating ports at this value, going downward"
......
{ {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": [ "required": [
"tcpv4-port" "tcpv4-port"
], ],
...@@ -9,7 +8,7 @@ ...@@ -9,7 +8,7 @@
"tcpv4-port": { "tcpv4-port": {
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/tcpv4port" "$ref": "./schemas-definitions.json#/tcpv4port"
}, },
{ {
"description": "Start allocating ports at this value, going upward" "description": "Start allocating ports at this value, going upward"
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"tcpv4port": {
"minimum": 0,
"maximum": 65535,
"type": "integer"
}
}
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