Commit 8297f3dc authored by Rafael Monnerat's avatar Rafael Monnerat

kvm/theia: fixup resilient schema

  You cannot expand properties with  since it expects
  to be an object or boolean.

  Revert to use allOf back, however set additionalProperties true,
  so the schemas are mutually partially valid.

  Other solutions might too verbose or too restrictive to the use
  case (or simply invalid).
parent 05cf6b5a
......@@ -2,58 +2,65 @@
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"description": "Parameters to instantiate resilient KVM",
"additionalProperties": false,
"properties": {
"$ref": "./instance-kvm-input-schema.json#/properties",
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"optional": true
"allOf": [
{
"$ref": "./instance-kvm-input-schema.json#",
"additionalProperties": true,
},
"-sla-0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
{
"additionalProperties": true,
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"optional": true
},
"-sla-0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
}
}
}
}
]
}
......@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"description": "Parameters to instantiate Theia",
"additionalProperties": false,
"unevaluatedProperties": false,
"properties": {
"autorun": {
"title": "Automatically Run Software/Instance",
......
......@@ -3,6 +3,11 @@
"type": "object",
"description": "Parameters to instantiate resilient Theia",
"additionalProperties": false,
"allOf": [
{
"$ref": "./instance-input-schema.json#"
}
],
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
......@@ -55,7 +60,7 @@
"type": "string",
"default": "2W",
"optional": true
},
"$ref": "./instance-input-schema.json#/properties"
}
}
},
"unevaluatedProperties": false
}
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