glanceclient.v2.metadefs module

class glanceclient.v2.metadefs.NamespaceController(http_client, schema_client)

Bases: object

create(**kwargs)

Create a namespace.

Parameters:

kwargs – Unpacked namespace object.

delete(namespace)

Delete a namespace.

get(namespace, **kwargs)
list(**kwargs)

Retrieve a listing of Namespace objects.

Parameters:
  • page_size – Number of items to request in each paginated request

  • limit – Use to request a specific page size. Expect a response to a limited request to return between zero and limit items.

  • 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.

  • sort_key – The field to sort on (for example, ‘created_at’)

  • sort_dir – The direction to sort (‘asc’ or ‘desc’)

Returns:

generator over list of Namespaces

property model
update(namespace_name, **kwargs)

Update a namespace.

Parameters:
  • namespace_name – Name of a namespace (old one).

  • kwargs – Unpacked namespace object.

class glanceclient.v2.metadefs.ObjectController(http_client, schema_client)

Bases: object

create(namespace, **kwargs)

Create an object.

Parameters:
  • namespace – Name of a namespace the object belongs.

  • kwargs – Unpacked object.

delete(namespace, object_name)

Delete an object.

delete_all(namespace)

Delete all objects in a namespace.

get(namespace, object_name)
list(namespace, **kwargs)

Retrieve a listing of metadata objects.

Returns:

generator over list of objects

property model
update(namespace, object_name, **kwargs)

Update an object.

Parameters:
  • namespace – Name of a namespace the object belongs.

  • object_name – Name of an object (old one).

  • kwargs – Unpacked object.

class glanceclient.v2.metadefs.PropertyController(http_client, schema_client)

Bases: object

create(namespace, **kwargs)

Create a property.

Parameters:
  • namespace – Name of a namespace the property will belong.

  • kwargs – Unpacked property object.

delete(namespace, prop_name)

Delete a property.

delete_all(namespace)

Delete all properties in a namespace.

get(namespace, prop_name)
list(namespace, **kwargs)

Retrieve a listing of metadata properties.

Returns:

generator over list of objects

property model
update(namespace, prop_name, **kwargs)

Update a property.

Parameters:
  • namespace – Name of a namespace the property belongs.

  • prop_name – Name of a property (old one).

  • kwargs – Unpacked property object.

class glanceclient.v2.metadefs.ResourceTypeController(http_client, schema_client)

Bases: object

associate(namespace, **kwargs)

Associate a resource type with a namespace.

deassociate(namespace, resource)

Deassociate a resource type with a namespace.

get(namespace)
list()

Retrieve a listing of available resource types.

Returns:

generator over list of resource_types

property model
class glanceclient.v2.metadefs.TagController(http_client, schema_client)

Bases: object

create(namespace, tag_name)

Create a tag.

Parameters:
  • namespace – Name of a namespace the Tag belongs.

  • tag_name – The name of the new tag to create.

create_multiple(namespace, **kwargs)

Create the list of tags.

Parameters:
  • namespace – Name of a namespace to which the Tags belong.

  • kwargs – list of tags, optional parameter append.

delete(namespace, tag_name)

Delete a tag.

delete_all(namespace)

Delete all tags in a namespace.

get(namespace, tag_name)
list(namespace, **kwargs)

Retrieve a listing of metadata tags.

Returns:

generator over list of tags.

property model
update(namespace, tag_name, **kwargs)

Update a tag.

Parameters:
  • namespace – Name of a namespace the Tag belongs.

  • tag_name – Name of the Tag (old one).

  • kwargs – Unpacked tag.