Do not raise a 404 if we send the checksum of the images

This commit is contained in:
Julien Duponchelle 2015-06-19 16:18:43 +02:00
parent f398d15025
commit 5c4a49a8c7
3 changed files with 68 additions and 2 deletions

View File

@ -57,6 +57,11 @@ VM_CREATE_SCHEMA = {
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"image_md5sum": {
"description": "checksum of the IOS image",
"type": "string",
"minLength": 1,
},
"startup_config": { "startup_config": {
"description": "path to the IOS startup configuration file", "description": "path to the IOS startup configuration file",
"type": "string", "type": "string",
@ -288,6 +293,11 @@ VM_UPDATE_SCHEMA = {
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"image_md5sum": {
"description": "checksum of the IOS image",
"type": "string",
"minLength": 1,
},
"startup_config_content": { "startup_config_content": {
"description": "Content of IOS startup configuration file", "description": "Content of IOS startup configuration file",
"type": "string", "type": "string",

View File

@ -46,6 +46,10 @@ IOU_CREATE_SCHEMA = {
"description": "Path of iou binary", "description": "Path of iou binary",
"type": "string" "type": "string"
}, },
"md5sum": {
"description": "Checksum of iou binary",
"type": "string"
},
"serial_adapters": { "serial_adapters": {
"description": "How many serial adapters are connected to the IOU", "description": "How many serial adapters are connected to the IOU",
"type": "integer" "type": "integer"
@ -115,6 +119,10 @@ IOU_UPDATE_SCHEMA = {
"description": "Path of iou binary", "description": "Path of iou binary",
"type": ["string", "null"] "type": ["string", "null"]
}, },
"md5sum": {
"description": "Checksum of iou binary",
"type": "string"
},
"serial_adapters": { "serial_adapters": {
"description": "How many serial adapters are connected to the IOU", "description": "How many serial adapters are connected to the IOU",
"type": ["integer", "null"] "type": ["integer", "null"]

View File

@ -55,18 +55,34 @@ QEMU_CREATE_SCHEMA = {
}, },
"hda_disk_image": { "hda_disk_image": {
"description": "QEMU hda disk image path", "description": "QEMU hda disk image path",
"type": ["string", "null"], "type": "string",
},
"hda_disk_image_md5sum": {
"description": "QEMU hda disk image checksum",
"type": ["string", "null"]
}, },
"hdb_disk_image": { "hdb_disk_image": {
"description": "QEMU hdb disk image path", "description": "QEMU hdb disk image path",
"type": "string",
},
"hdb_disk_image_md5sum": {
"description": "QEMU hdb disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"hdc_disk_image": { "hdc_disk_image": {
"description": "QEMU hdc disk image path", "description": "QEMU hdc disk image path",
"type": "string",
},
"hdc_disk_image_md5sum": {
"description": "QEMU hdc disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"hdd_disk_image": { "hdd_disk_image": {
"description": "QEMU hdd disk image path", "description": "QEMU hdd disk image path",
"type": "string",
},
"hdd_disk_image_md5sum": {
"description": "QEMU hdd disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"ram": { "ram": {
@ -91,11 +107,19 @@ QEMU_CREATE_SCHEMA = {
"pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$" "pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
}, },
"initrd": { "initrd": {
"description": "QEMU initrd path",
"type": "string",
},
"initrd_md5sum": {
"description": "QEMU initrd path", "description": "QEMU initrd path",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"kernel_image": { "kernel_image": {
"description": "QEMU kernel image path", "description": "QEMU kernel image path",
"type": "string",
},
"kernel_image_md5sum": {
"description": "QEMU kernel image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"kernel_command_line": { "kernel_command_line": {
@ -166,18 +190,34 @@ QEMU_UPDATE_SCHEMA = {
}, },
"hda_disk_image": { "hda_disk_image": {
"description": "QEMU hda disk image path", "description": "QEMU hda disk image path",
"type": ["string", "null"], "type": "string",
},
"hda_disk_image_md5sum": {
"description": "QEMU hda disk image checksum",
"type": ["string", "null"]
}, },
"hdb_disk_image": { "hdb_disk_image": {
"description": "QEMU hdb disk image path", "description": "QEMU hdb disk image path",
"type": "string",
},
"hdb_disk_image_md5sum": {
"description": "QEMU hdb disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"hdc_disk_image": { "hdc_disk_image": {
"description": "QEMU hdc disk image path", "description": "QEMU hdc disk image path",
"type": "string",
},
"hdc_disk_image_md5sum": {
"description": "QEMU hdc disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"hdd_disk_image": { "hdd_disk_image": {
"description": "QEMU hdd disk image path", "description": "QEMU hdd disk image path",
"type": "string",
},
"hdd_disk_image_md5sum": {
"description": "QEMU hdd disk image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"ram": { "ram": {
@ -202,11 +242,19 @@ QEMU_UPDATE_SCHEMA = {
"pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$" "pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
}, },
"initrd": { "initrd": {
"description": "QEMU initrd path",
"type": "string",
},
"initrd_md5sum": {
"description": "QEMU initrd path", "description": "QEMU initrd path",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"kernel_image": { "kernel_image": {
"description": "QEMU kernel image path", "description": "QEMU kernel image path",
"type": "string",
},
"kernel_image_md5sum": {
"description": "QEMU kernel image checksum",
"type": ["string", "null"], "type": ["string", "null"],
}, },
"kernel_command_line": { "kernel_command_line": {