Commit df5d4f60 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 @@ ...@@ -2,58 +2,65 @@
"type": "object", "type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema#", "$schema": "https://json-schema.org/draft/2020-12/schema#",
"description": "Parameters to instantiate resilient KVM", "description": "Parameters to instantiate resilient KVM",
"additionalProperties": false, "allOf": [
"properties": { {
"$ref": "./instance-kvm-input-schema.json#/properties", "$ref": "./instance-kvm-input-schema.json#",
"resilient-clone-number": { "additionalProperties": true,
"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", "additionalProperties": true,
"description": "Target computer GUID for main instance.", "properties": {
"type": "string", "resilient-clone-number": {
"optional": true "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.",
"-sla-1-computer_guid": { "type": "integer",
"title": "Target computer for first clone", "default": 1,
"description": "Target computer for first clone and PBS.", "optional": true
"type": "string", },
"optional": true "-sla-0-computer_guid": {
}, "title": "Target computer for main instance",
"-sla-pbs1-computer_guid": { "description": "Target computer GUID for main instance.",
"title": "Target computer for first PBS", "type": "string",
"description": "Target computer for first PBS instance.", "optional": true
"type": "string", },
"optional": true "-sla-1-computer_guid": {
}, "title": "Target computer for first clone",
"-sla-2-computer_guid": { "description": "Target computer for first clone and PBS.",
"title": "Target computer for second clone", "type": "string",
"description": "Target computer for second clone and PBS.", "optional": true
"type": "string", },
"optional": true "-sla-pbs1-computer_guid": {
}, "title": "Target computer for first PBS",
"-sla-pbs2-computer_guid": { "description": "Target computer for first PBS instance.",
"title": "Target computer for second PBS", "type": "string",
"description": "Target computer for second PBS instance.", "optional": true
"type": "string", },
"optional": true "-sla-2-computer_guid": {
}, "title": "Target computer for second clone",
"resiliency-backup-periodicity": { "description": "Target computer for second clone and PBS.",
"title": "Periodicity of backup", "type": "string",
"description": "Periodicity of backup, in cron format.", "optional": true
"type": "string", },
"optional": true "-sla-pbs2-computer_guid": {
}, "title": "Target computer for second PBS",
"remove-backup-older-than": { "description": "Target computer for second PBS instance.",
"title": "Remove backups older than...", "type": "string",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.", "optional": true
"type": "string", },
"default": "2W", "resiliency-backup-periodicity": {
"optional": true "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,60 +2,67 @@ ...@@ -2,60 +2,67 @@
"$schema": "https://json-schema.org/draft/2020-12/schema#", "$schema": "https://json-schema.org/draft/2020-12/schema#",
"type": "object", "type": "object",
"description": "Parameters to instantiate resilient Theia", "description": "Parameters to instantiate resilient Theia",
"additionalProperties": false, "allOf": [
"properties": { {
"resilient-clone-number": { "$ref": "./instance-input-schema.json#",
"title": "Amount of backup(s) to create", "additionalProperties": true
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"minimum": 0,
"maximum": 2,
"optional": true
}, },
"-sla-theia0-computer_guid": { {
"title": "Target computer for main instance", "additionalProperties": true,
"description": "Target computer GUID for main instance.", "properties": {
"type": "string", "resilient-clone-number": {
"optional": true "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.",
"-sla-theia1-computer_guid": { "type": "integer",
"title": "Target computer for first clone", "default": 1,
"description": "Target computer for first clone instance.", "minimum": 0,
"type": "string", "maximum": 2,
"optional": true "optional": true
}, },
"-sla-pbs1-computer_guid": { "-sla-theia0-computer_guid": {
"title": "Target computer for first PBS", "title": "Target computer for main instance",
"description": "Target computer for first PBS instance.", "description": "Target computer GUID for main instance.",
"type": "string", "type": "string",
"optional": true "optional": true
}, },
"-sla-theia2-computer_guid": { "-sla-theia1-computer_guid": {
"title": "Target computer for second clone", "title": "Target computer for first clone",
"description": "Target computer for second clone instance.", "description": "Target computer for first clone instance.",
"type": "string", "type": "string",
"optional": true "optional": true
}, },
"-sla-pbs2-computer_guid": { "-sla-pbs1-computer_guid": {
"title": "Target computer for second PBS", "title": "Target computer for first PBS",
"description": "Target computer for second PBS instance.", "description": "Target computer for first PBS instance.",
"type": "string", "type": "string",
"optional": true "optional": true
}, },
"resiliency-backup-periodicity": { "-sla-theia2-computer_guid": {
"title": "Periodicity of backup", "title": "Target computer for second clone",
"description": "Periodicity of backup, in cron format.", "description": "Target computer for second clone instance.",
"type": "string", "type": "string",
"optional": true "optional": true
}, },
"remove-backup-older-than": { "-sla-pbs2-computer_guid": {
"title": "Remove backups older than...", "title": "Target computer for second PBS",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.", "description": "Target computer for second PBS instance.",
"type": "string", "type": "string",
"default": "2W", "optional": true
"optional": true },
}, "resiliency-backup-periodicity": {
"$ref": "./instance-input-schema.json#/properties" "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
}
}
}
]
} }
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