The openstack_dashboard.api.rest.glance Module
API for the glance service.
-
class openstack_dashboard.api.rest.glance.Image(**kwargs)[source]
Bases: django.views.generic.base.View
API for retrieving a single image
-
get(request, *args, **kw)[source]
Get a specific image
http://localhost/api/glance/images/cc758c90-3d98-4ea1-af44-aab405c9c915
-
url_regex = 'glance/images/(?P<image_id>[^/]+|default)/$'
-
class openstack_dashboard.api.rest.glance.ImageProperties(**kwargs)[source]
Bases: django.views.generic.base.View
API for retrieving only a custom properties of single image.
-
get(request, *args, **kw)[source]
Get custom properties of specific image.
-
patch(request, *args, **kw)[source]
Update custom properties of specific image.
This method returns HTTP 204 (no content) on success.
-
url_regex = 'glance/images/(?P<image_id>[^/]+)/properties/'
-
class openstack_dashboard.api.rest.glance.Images(**kwargs)[source]
Bases: django.views.generic.base.View
API for Glance images.
-
get(request, *args, **kw)[source]
Get a list of images.
The listing result is an object with property “items”. Each item is
an image.
Example GET:
http://localhost/api/glance/images?sort_dir=desc&sort_key=name&name=cirros-0.3.2-x86_64-uec #flake8: noqa
The following get parameters may be passed in the GET
request:
Parameters: |
- paginate – If true will perform pagination based on settings.
- marker – Specifies the namespace of the last-seen image.
The typical pattern of limit and marker is to make an
initial limited request and then to use the last
namespace from the response as the marker parameter
in a subsequent limited request. With paginate, limit
is automatically set.
- sort_dir – The sort direction (‘asc’ or ‘desc’).
- sort_key – The field to sort on (for example, ‘created_at’).
Default is created_at.
|
Any additional request parameters will be passed through the API as
filters. There are v1/v2 complications which are being addressed as a
separate work stream: https://review.openstack.org/#/c/150084/
-
url_regex = 'glance/images/$'
-
class openstack_dashboard.api.rest.glance.MetadefsNamespaces(**kwargs)[source]
Bases: django.views.generic.base.View
API for Single Glance Metadata Definitions.
http://docs.openstack.org/developer/glance/metadefs-concepts.html
-
get(request, *args, **kw)[source]
Get a list of metadata definition namespaces.
The listing result is an object with property “items”. Each item is
a namespace.
Example GET:
http://localhost/api/glance/metadefs/namespaces?resource_types=OS::Nova::Flavor&sort_dir=desc&marker=OS::Compute::Watchdog&paginate=False&sort_key=namespace #flake8: noqa
The following get parameters may be passed in the GET
request:
Parameters: |
- resource_type – Namespace resource type.
If specified returned namespace properties will have prefixes
proper for selected resource type.
- paginate – If true will perform pagination based on settings.
- marker – Specifies the namespace of the last-seen namespace.
The typical pattern of limit and marker is to make an
initial limited request and then to use the last
namespace from the response as the marker parameter
in a subsequent limited request. With paginate, limit
is automatically set.
- sort_dir – The sort direction (‘asc’ or ‘desc’).
- sort_key – The field to sort on (for example, ‘created_at’).
Default is namespace. The way base namespaces are loaded into
glance typically at first deployment is done in a single
transaction giving them a potentially unpredictable sort result
when using create_at.
|
Any additional request parameters will be passed through the API as
filters.
-
url_regex = 'glance/metadefs/namespaces/$'