Merge "Update outdated image shema"

This commit is contained in:
Jenkins 2016-07-16 10:27:18 +00:00 committed by Gerrit Code Review
commit 1763e33d3d

@ -22,32 +22,21 @@ _BASE_SCHEMA = {
"type": "string" "type": "string"
}, },
"name": "image", "name": "image",
"links": [ "links": [{
{ "href": "{self}",
"href": "{self}", "rel": "self"
"rel": "self" }, {
}, "href": "{file}",
{ "rel": "enclosure"
"href": "{file}", }, {
"rel": "enclosure" "href": "{schema}",
}, "rel": "describedby"
{ }],
"href": "{schema}",
"rel": "describedby"
}
],
"properties": { "properties": {
"container_format": { "container_format": {
"enum": [ "enum": [None, "ami", "ari", "aki", "bare", "ovf", "ova",
"ami", "docker"],
"ari", "type": ["null", "string"],
"aki",
"bare",
"ovf",
"ova",
"docker"
],
"type": "string",
"description": "Format of the container" "description": "Format of the container"
}, },
"min_ram": { "min_ram": {
@ -58,17 +47,15 @@ _BASE_SCHEMA = {
"pattern": ("^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}" "pattern": ("^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}"
"-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}" "-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}"
"-([0-9a-fA-F]){12}$"), "-([0-9a-fA-F]){12}$"),
"type": "string", "type": ["null", "string"],
"description": ("ID of image stored in Glance that should be " "description": ("ID of image stored in Glance that should be "
"used as the ramdisk when booting an AMI-style " "used as the ramdisk when booting an AMI-style "
"image.") "image."),
"is_base": False
}, },
"locations": { "locations": {
"items": { "items": {
"required": [ "required": ["url", "metadata"],
"url",
"metadata"
],
"type": "object", "type": "object",
"properties": { "properties": {
"url": { "url": {
@ -85,12 +72,12 @@ _BASE_SCHEMA = {
"file kept in external store") "file kept in external store")
}, },
"file": { "file": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": ("An image file url") "type": "string",
"description": "An image file url"
}, },
"owner": { "owner": {
"type": "string", "type": ["null", "string"],
"description": "Owner of the image", "description": "Owner of the image",
"maxLength": 255 "maxLength": 255
}, },
@ -102,62 +89,49 @@ _BASE_SCHEMA = {
"description": "An identifier for the image" "description": "An identifier for the image"
}, },
"size": { "size": {
"type": "integer",
"readOnly": True, "readOnly": True,
"type": ["null", "integer"],
"description": "Size of image file in bytes" "description": "Size of image file in bytes"
}, },
"os_distro": { "os_distro": {
"type": "string", "type": "string",
"description": ("Common name of operating system distribution " "description": ("Common name of operating system distribution "
"as specified in %s" % _doc_url) "as specified in %s" % _doc_url),
"is_base": False
}, },
"self": { "self": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": ("An image self url") "type": "string",
"description": "An image self url"
}, },
"disk_format": { "disk_format": {
"enum": [ "enum": [None, "ami", "ari", "aki", "vhd", "vmdk", "raw",
"ami", "qcow2", "vdi", "iso"],
"ari", "type": ["null", "string"],
"aki",
"vhd",
"vmdk",
"raw",
"qcow2",
"vdi",
"iso"
],
"type": "string",
"description": "Format of the disk" "description": "Format of the disk"
}, },
"os_version": { "os_version": {
"type": "string", "type": "string",
"description": ("Operating system version as " "description": "Operating system version as specified by the"
"specified by the distributor") " distributor",
"is_base": False
}, },
"direct_url": { "direct_url": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": ("URL to access the image file kept in " "type": "string",
"external store") "description": "URL to access the image file kept in external"
" store"
}, },
"schema": { "schema": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": ("An image schema url") "type": "string",
"description": "An image schema url"
}, },
"status": { "status": {
"enum": [
"queued",
"saving",
"active",
"killed",
"deleted",
"pending_delete"
],
"type": "string",
"readOnly": True, "readOnly": True,
"enum": ["queued", "saving", "active", "killed", "deleted",
"pending_delete", "deactivated"],
"type": "string",
"description": "Status of the image" "description": "Status of the image"
}, },
"tags": { "tags": {
@ -169,60 +143,57 @@ _BASE_SCHEMA = {
"description": "List of strings related to the image" "description": "List of strings related to the image"
}, },
"kernel_id": { "kernel_id": {
"pattern": ("^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-" "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F])"
"([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-" "{4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"([0-9a-fA-F]){12}$"), "type": ["null", "string"],
"type": "string", "description": "ID of image stored in Glance that should be "
"description": ("ID of image stored in Glance that should be " "used as the kernel when booting an "
"used as the kernel when booting an AMI-style " "AMI-style image.",
"image.") "is_base": False
}, },
"visibility": { "visibility": {
"enum": [ "enum": ["public", "private"],
"public",
"private"
],
"type": "string", "type": "string",
"description": "Scope of image accessibility" "description": "Scope of image accessibility"
}, },
"updated_at": { "updated_at": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": ("Date and time of the last " "type": "string",
"image modification") "description": "Date and time of the last image modification"
}, },
"min_disk": { "min_disk": {
"type": "integer", "type": "integer",
"description": ("Amount of disk space (in GB) " "description": "Amount of disk space (in GB) required to boot "
"required to boot image.") "image."
}, },
"virtual_size": { "virtual_size": {
"type": "integer",
"readOnly": True, "readOnly": True,
"type": ["null", "integer"],
"description": "Virtual size of image in bytes" "description": "Virtual size of image in bytes"
}, },
"instance_uuid": { "instance_uuid": {
"type": "string", "type": "string",
"description": ("Metadata which can be used to record which " "description": "Metadata which can be used to record which "
"instance this image is associated with. " "instance this image is associated with. "
"(Informational only, does not create an instance " "(Informational only, does not create an "
"snapshot.)") "instance snapshot.)",
"is_base": False
}, },
"name": { "name": {
"type": "string", "type": ["null", "string"],
"description": "Descriptive name for the image", "description": "Descriptive name for the image",
"maxLength": 255 "maxLength": 255
}, },
"checksum": { "checksum": {
"type": "string",
"readOnly": True, "readOnly": True,
"type": ["null", "string"],
"description": "md5 hash of image contents.", "description": "md5 hash of image contents.",
"maxLength": 32 "maxLength": 32
}, },
"created_at": { "created_at": {
"type": "string",
"readOnly": True, "readOnly": True,
"description": "Date and time of image registration " "type": "string",
"description": "Date and time of image registration"
}, },
"protected": { "protected": {
"type": "boolean", "type": "boolean",
@ -231,7 +202,8 @@ _BASE_SCHEMA = {
"architecture": { "architecture": {
"type": "string", "type": "string",
"description": ("Operating system architecture as specified " "description": ("Operating system architecture as specified "
"in %s" % _doc_url) "in %s" % _doc_url),
"is_base": False
} }
} }
} }