Image API v1¶
For details on how to use image, see Using OpenStack Image
The Image v1 Class¶
The image high-level interface is available through the image
member of a
Connection
object. The image
member will
only be added if the service is detected.
-
class
openstack.image.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)¶ -
upload_image
(**attrs)¶ Upload a new image from attributes
-
update_image
(image, **attrs)¶ Update a image
-
delete_image
(image, ignore_missing=True)¶ Delete an image
- Parameters
image – The value can be either the ID of an image or a
Image
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the image does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent image.
- Returns
None
-
get_image
(image)¶ Get a single image
-
find_image
(name_or_id, ignore_missing=True)¶ Find a single image
- Parameters
name_or_id – The name or ID of a image.
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
Image
or None
-