Commit 3b37d42a authored by Rafael Monnerat's avatar Rafael Monnerat

kvm: Fix JSON Schema syntax

parent cd49d10b
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"frontend": { "frontend": {
"frontend-instance-guid": { "title": "KVM frontend (web socket)",
"title": "Frontend Instance ID", "description": "Front end used to provide VNC.",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".", "properties": {
"type": "string", "frontend-instance-guid": {
"default": "" "title": "Frontend Instance ID",
}, "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"frontend-software-type": { "type": "string",
"title": "Frontend Software Type", "default": ""
"description": "Type of the frontend instance, like \"frontend\".", },
"type": "string", "frontend-software-type": {
"default": "frontend" "title": "Frontend Software Type",
}, "description": "Type of the frontend instance, like \"frontend\".",
"frontend-software-url": { "type": "string",
"title": "Frontend Software URL", "default": "frontend"
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".", },
"type": "string", "frontend-software-url": {
"format": "uri", "title": "Frontend Software URL",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg" "description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg"
}
}, },
"type": "object" "type": "object"
}, },
"slave-frontend": { "slave-frontend": {
"instance-guid": { "title": "Web frontend",
"title": "Main Frontend Instance ID", "description": "Front end used to provide web access for internal services at the kvm.",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".", "properties": {
"type": "string", "instance-guid": {
"default": "" "title": "Main Frontend Instance ID",
}, "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"frontend-software-type": { "type": "string",
"title": "Frontend Software Type", "default": ""
"description": "Type of the frontend instance, like \"frontend\".", },
"type": "string", "frontend-software-type": {
"default": "default" "title": "Frontend Software Type",
}, "description": "Type of the frontend instance, like \"frontend\".",
"frontend-software-url": { "type": "string",
"title": "Frontend Software URL", "default": "default"
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".", },
"type": "string", "frontend-software-url": {
"format": "uri", "title": "Frontend Software URL",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg" "description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
}, "type": "string",
"slave-frontend-dict": { "format": "uri",
"description": "kvm instances definition", "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
"patternProperties": { },
".*": { "slave-frontend-dict": {
"title": "Slave Front end definition",
"description": "Slave Front end definition",
"patternProperties": {
".*": {
"properties": { "properties": {
"domain": { "domain": {
"title": "Name of the domain to be used", "title": "Name of the domain to be used",
"description": "Name of the domain to be used (example: mydomain.com). Subdomains of this domain will be used for the slave instances (example: instance12345.mydomain.com).", "description": "Name of the domain to be used (example: mydomain.com). Subdomains of this domain will be used for the slave instances (example: instance12345.mydomain.com).",
"type": "string", "type": "string",
"format": "uri",
"default": "" "default": ""
}, },
"url": { "url": {
...@@ -96,12 +102,9 @@ ...@@ -96,12 +102,9 @@
"default": "" "default": ""
}, },
"service-port": { "service-port": {
"allOf": [{ "title": "Specify the port of service to run in VM.",
"$ref": "#/definitions/tcpv4port" "description": "This will allow to get URL from defined nat-rules. The port should exist in nat-rules of KVM referenced by 'kvm-partition-name'",
}, { "type": "number"
"title": "Specify the port of service to run in VM.",
"description": "This will allow to get URL from defined nat-rules. The port should exist in nat-rules of KVM referenced by 'kvm-partition-name'"
}]
}, },
"url-scheme": { "url-scheme": {
"title": "Say If HTTP service to run into the Virtual Machine will use http or https.", "title": "Say If HTTP service to run into the Virtual Machine will use http or https.",
...@@ -110,139 +113,155 @@ ...@@ -110,139 +113,155 @@
"default": "http" "default": "http"
} }
}, },
"type": "object" "type": "object"
} }
}, },
"type": "object" "type": "object"
}
}, },
"type": "object" "type": "object"
}, },
"kvm-partition-dict": { "kvm-partition-dict": {
"title": "kvm instances definition",
"description": "kvm instances definition", "description": "kvm instances definition",
"patternProperties": { "patternProperties": {
".*": { ".*": {
"properties": { "properties": {
"ram-size": { "ram-size": {
"title": "RAM size", "title": "RAM size",
"description": "RAM size, in MB.", "description": "RAM size, in MB.",
"type": "integer", "type": "integer",
"default": 1024, "default": 1024,
"minimum": 128, "minimum": 128,
"multipleOf": 128, "multipleOf": 128,
"maximum": 16384 "maximum": 16384
}, },
"disk-size": { "disk-size": {
"title": "Disk size", "title": "Disk size",
"description": "Disk size, in GB.", "description": "Disk size, in GB.",
"type": "integer", "type": "integer",
"default": 10, "default": 10,
"minimum": 1, "minimum": 1,
"maximum": 80 "maximum": 80
}, },
"disk-type": { "disk-type": {
"title": "Disk type", "title": "Disk type",
"description": "Type of QEMU disk drive.", "description": "Type of QEMU disk drive.",
"type": "string", "type": "string",
"default": "virtio", "default": "virtio",
"enum": ["ide", "scsi", "sd", "mtd", "floppy", "pflash", "virtio"] "enum": [
}, "ide",
"scsi",
"cpu-count": { "sd",
"title": "CPU count", "mtd",
"description": "Number of CPU cores.", "floppy",
"type": "integer", "pflash",
"minimum": 1, "virtio"
"maximum": 8 ]
}, },
"cpu-count": {
"nbd-host": { "title": "CPU count",
"title": "NBD hostname", "description": "Number of CPU cores.",
"description": "hostname (or IP) of the NBD server containing the boot image.", "type": "integer",
"type": "string", "minimum": 1,
"format": ["host-name", "ip-address", "ipv6"], "maximum": 8
"default": "debian.nbd.vifib.net" },
}, "nbd-host": {
"nbd-port": { "title": "NBD hostname",
"title": "NBD port", "description": "hostname (or IP) of the NBD server containing the boot image.",
"description": "Port of the NBD server containing the boot image.", "type": "string",
"type": "integer", "format": [
"default": 1024, "host-name",
"minimum": 1, "ip-address",
"maximum": 65535 "ipv6"
}, ],
"default": "debian.nbd.vifib.net"
"nbd2-host": { },
"title": "Second NBD hostname", "nbd-port": {
"description": "hostname (or IP) of the second NBD server (containing drivers for example).", "title": "NBD port",
"type": "string", "description": "Port of the NBD server containing the boot image.",
"format": ["host-name", "ip-address", "ipv6"] "type": "integer",
}, "default": 1024,
"nbd2-port": { "minimum": 1,
"title": "Second NBD port", "maximum": 65535
"description": "Port of the second NBD server containing the boot image.", },
"type": "integer", "nbd2-host": {
"minimum": 1, "title": "Second NBD hostname",
"maximum": 65535 "description": "hostname (or IP) of the second NBD server (containing drivers for example).",
}, "type": "string",
"format": [
"virtual-hard-drive-url": { "host-name",
"title": "Existing disk image URL", "ip-address",
"description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.", "ipv6"
"format": "uri", ]
"type": "string" },
}, "nbd2-port": {
"virtual-hard-drive-md5sum": { "title": "Second NBD port",
"title": "Checksum of virtual hard drive", "description": "Port of the second NBD server containing the boot image.",
"description": "MD5 checksum of virtual hard drive, used if virtual-hard-drive-url is specified.", "type": "integer",
"type": "string" "minimum": 1,
}, "maximum": 65535
"virtual-hard-drive-gzipped": { },
"title": "Define if virtual hard drive to download is gzipped", "virtual-hard-drive-url": {
"description": "Define if virtual hard drive to download is gzipped using gzip. This help to reduce size of file to download.", "title": "Existing disk image URL",
"type": "boolean", "description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
"default": false "format": "uri",
}, "type": "string"
},
"external-disk-number": { "virtual-hard-drive-md5sum": {
"title": "Number of additional disk to create for virtual machine", "title": "Checksum of virtual hard drive",
"description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.", "description": "MD5 checksum of virtual hard drive, used if virtual-hard-drive-url is specified.",
"type": "integer", "type": "string"
"minimum": 0, },
"maximum": 4, "virtual-hard-drive-gzipped": {
"default": 0 "title": "Define if virtual hard drive to download is gzipped",
}, "description": "Define if virtual hard drive to download is gzipped using gzip. This help to reduce size of file to download.",
"external-disk-size": { "type": "boolean",
"title": "Number of additional disk to create for virtual machine, in Gigabytes", "default": false
"description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.", },
"type": "integer", "external-disk-number": {
"minimum": 10, "title": "Number of additional disk to create for virtual machine",
"maximum": 100, "description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.",
"default": 20 "type": "integer",
}, "minimum": 0,
"maximum": 4,
"use-tap": { "default": 0
"title": "Use QEMU TAP network interface", },
"description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.", "external-disk-size": {
"type": "boolean", "title": "Number of additional disk to create for virtual machine, in Gigabytes",
"default": false "description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.",
}, "type": "integer",
"use-nat": { "minimum": 10,
"title": "Use QEMU USER Mode networking", "maximum": 100,
"description": "Use QEMU user-mode network stack (NAT).", "default": 20
"type": "boolean", },
"default": true "use-tap": {
}, "title": "Use QEMU TAP network interface",
"nat-rules": { "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
"title": "List of rules for NAT of QEMU user mode network stack.", "type": "boolean",
"description": "List of rules for NAT of QEMU user mode network stack, as comma-separated list of ports. For each port specified, it will redirect port x of the VM (example: 80) to the port x + 10000 of the public IPv6 (example: 10080). Defaults to \"22 80 443\". Ignored if \"use-tap\" parameter is enabled.", "default": false
"type": "array", },
"default": [22, 80, 443] "use-nat": {
} "title": "Use QEMU USER Mode networking",
"description": "Use QEMU user-mode network stack (NAT).",
"type": "boolean",
"default": true
}, },
"nat-rules": {
"title": "List of rules for NAT of QEMU user mode network stack.",
"description": "List of rules for NAT of QEMU user mode network stack, as comma-separated list of ports. For each port specified, it will redirect port x of the VM (example: 80) to the port x + 10000 of the public IPv6 (example: 10080). Defaults to \"22 80 443\". Ignored if \"use-tap\" parameter is enabled.",
"type": "array",
"default": [
22,
80,
443
]
}
},
"type": "object" "type": "object"
} }
}, },
"type": "object" "type": "object"
} }
} }
} }
\ No newline at end of file
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