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": {
"title": "KVM frontend (web socket)",
"description": "Front end used to provide VNC.",
"properties": {
"frontend-instance-guid": { "frontend-instance-guid": {
"title": "Frontend Instance ID", "title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".", "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
...@@ -23,10 +25,14 @@ ...@@ -23,10 +25,14 @@
"type": "string", "type": "string",
"format": "uri", "format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg" "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": {
"title": "Web frontend",
"description": "Front end used to provide web access for internal services at the kvm.",
"properties": {
"instance-guid": { "instance-guid": {
"title": "Main Frontend Instance ID", "title": "Main Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".", "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
...@@ -47,7 +53,8 @@ ...@@ -47,7 +53,8 @@
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg" "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
}, },
"slave-frontend-dict": { "slave-frontend-dict": {
"description": "kvm instances definition", "title": "Slave Front end definition",
"description": "Slave Front end definition",
"patternProperties": { "patternProperties": {
".*": { ".*": {
"properties": { "properties": {
...@@ -55,7 +62,6 @@ ...@@ -55,7 +62,6 @@
"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": [{
"$ref": "#/definitions/tcpv4port"
}, {
"title": "Specify the port of service to run in VM.", "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'" "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"
}, },
"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.",
...@@ -114,10 +117,12 @@ ...@@ -114,10 +117,12 @@
} }
}, },
"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": {
".*": { ".*": {
...@@ -144,9 +149,16 @@ ...@@ -144,9 +149,16 @@
"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",
"sd",
"mtd",
"floppy",
"pflash",
"virtio"
]
}, },
"cpu-count": { "cpu-count": {
"title": "CPU count", "title": "CPU count",
"description": "Number of CPU cores.", "description": "Number of CPU cores.",
...@@ -154,12 +166,15 @@ ...@@ -154,12 +166,15 @@
"minimum": 1, "minimum": 1,
"maximum": 8 "maximum": 8
}, },
"nbd-host": { "nbd-host": {
"title": "NBD hostname", "title": "NBD hostname",
"description": "hostname (or IP) of the NBD server containing the boot image.", "description": "hostname (or IP) of the NBD server containing the boot image.",
"type": "string", "type": "string",
"format": ["host-name", "ip-address", "ipv6"], "format": [
"host-name",
"ip-address",
"ipv6"
],
"default": "debian.nbd.vifib.net" "default": "debian.nbd.vifib.net"
}, },
"nbd-port": { "nbd-port": {
...@@ -170,12 +185,15 @@ ...@@ -170,12 +185,15 @@
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"nbd2-host": { "nbd2-host": {
"title": "Second NBD hostname", "title": "Second NBD hostname",
"description": "hostname (or IP) of the second NBD server (containing drivers for example).", "description": "hostname (or IP) of the second NBD server (containing drivers for example).",
"type": "string", "type": "string",
"format": ["host-name", "ip-address", "ipv6"] "format": [
"host-name",
"ip-address",
"ipv6"
]
}, },
"nbd2-port": { "nbd2-port": {
"title": "Second NBD port", "title": "Second NBD port",
...@@ -184,7 +202,6 @@ ...@@ -184,7 +202,6 @@
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"virtual-hard-drive-url": { "virtual-hard-drive-url": {
"title": "Existing disk image URL", "title": "Existing disk image URL",
"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.", "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.",
...@@ -202,7 +219,6 @@ ...@@ -202,7 +219,6 @@
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },
"external-disk-number": { "external-disk-number": {
"title": "Number of additional disk to create for virtual machine", "title": "Number of additional disk to create for virtual machine",
"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": "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.",
...@@ -219,7 +235,6 @@ ...@@ -219,7 +235,6 @@
"maximum": 100, "maximum": 100,
"default": 20 "default": 20
}, },
"use-tap": { "use-tap": {
"title": "Use QEMU TAP network interface", "title": "Use QEMU TAP network interface",
"description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.", "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
...@@ -236,7 +251,11 @@ ...@@ -236,7 +251,11 @@
"title": "List of rules for NAT of QEMU user mode network stack.", "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.", "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", "type": "array",
"default": [22, 80, 443] "default": [
22,
80,
443
]
} }
}, },
"type": "object" "type": "object"
......
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