The openstack_dashboard.api.glance ModuleΒΆ

class openstack_dashboard.api.glance.BaseGlanceMetadefAPIResourceWrapper(apiresource)[source]

Bases: openstack_dashboard.api.base.APIResourceWrapper

as_json(indent=4)[source]
description[source]
to_dict()[source]
class openstack_dashboard.api.glance.ExternallyUploadedImage(apiresource, request)[source]

Bases: openstack_dashboard.api.glance.Image

to_dict()[source]
token_id[source]
upload_url[source]
class openstack_dashboard.api.glance.Image(apiresource)[source]

Bases: openstack_dashboard.api.base.APIResourceWrapper

is_public[source]
name[source]
property_visible(prop_name, show_ext_attrs=False)[source]
size[source]
to_dict(show_ext_attrs=False)[source]
class openstack_dashboard.api.glance.Namespace(apiresource)[source]

Bases: openstack_dashboard.api.glance.BaseGlanceMetadefAPIResourceWrapper

public[source]
resource_type_names[source]
openstack_dashboard.api.glance.filter_properties_target(namespaces_iter, resource_types, properties_target)[source]

Filter metadata namespaces based on the given resource types and properties target.

Parameters:
  • namespaces_iter – Metadata namespaces iterable.
  • resource_types – List of resource type names.
  • properties_target – Name of the properties target.
openstack_dashboard.api.glance.get_image_upload_mode()[source]
openstack_dashboard.api.glance.get_version()[source]
openstack_dashboard.api.glance.glanceclient(*args, **kwargs)[source]
openstack_dashboard.api.glance.image_create(request, **kwargs)[source]

Create image.

Parameters:kwargs
  • copy_from: URL from which Glance server should immediately copy
    the data and store it in its configured image store.
  • data: Form data posted from client.
  • location: URL where the data for this image already resides.

In the case of ‘copy_from’ and ‘location’, the Glance server will give us a immediate response from create and handle the data asynchronously.

In the case of ‘data’ the process of uploading the data may take some time and is handed off to a separate thread.

openstack_dashboard.api.glance.image_delete(request, image_id)[source]
openstack_dashboard.api.glance.image_delete_properties(request, image_id, keys)[source]

Delete custom properties for an image.

openstack_dashboard.api.glance.image_get(request, image_id)[source]

Returns an Image object populated with metadata for image with supplied identifier.

openstack_dashboard.api.glance.image_list_detailed(request, marker=None, sort_dir='desc', sort_key='created_at', filters=None, paginate=False, reversed_order=False, **kwargs)[source]

Thin layer above glanceclient, for handling pagination issues.

It provides iterating both forward and backward on top of ascetic OpenStack pagination API - which natively supports only iterating forward through the entries. Thus in order to retrieve list of objects at previous page, a request with the reverse entries order had to be made to Glance, using the first object id on current page as the marker - restoring the original items ordering before sending them back to the UI.

openstack_dashboard.api.glance.image_update(request, image_id, **kwargs)[source]
openstack_dashboard.api.glance.image_update_properties(request, image_id, remove_props=None, **kwargs)[source]

Add or update a custom property of an image.

openstack_dashboard.api.glance.metadefs_namespace_add_resource_type(request, namespace_name, resource_type)[source]
openstack_dashboard.api.glance.metadefs_namespace_create(request, namespace)[source]
openstack_dashboard.api.glance.metadefs_namespace_delete(request, namespace_name)[source]
openstack_dashboard.api.glance.metadefs_namespace_full_list(request, resource_type, filters=None, *args, **kwargs)[source]
openstack_dashboard.api.glance.metadefs_namespace_get(*args, **kwargs)[source]
openstack_dashboard.api.glance.metadefs_namespace_list(request, filters=None, sort_dir='asc', sort_key='namespace', marker=None, paginate=False)[source]

Retrieve a listing of Namespaces

Parameters:
  • 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.
  • filters – specifies addition fields to filter on such as resource_types.
Returns A tuple of three values:
 
  1. Current page results
  2. A boolean of whether or not there are previous page(s).
  3. A boolean of whether or not there are more page(s).
openstack_dashboard.api.glance.metadefs_namespace_remove_resource_type(request, namespace_name, resource_type_name)[source]
openstack_dashboard.api.glance.metadefs_namespace_resource_types(request, namespace_name)[source]
openstack_dashboard.api.glance.metadefs_namespace_update(request, namespace_name, **properties)[source]
openstack_dashboard.api.glance.metadefs_resource_types_list(request)[source]

Previous topic

The openstack_dashboard.api.neutron Module

Next topic

The openstack_dashboard.api Module

Project Source

This Page