Object Store API

For details on how to use this API, see Using the OpenStack Object Store API

The Object Store Class

The Object Store high-level interface is exposed as the object_store object on Connection objects.

class openstack.object_store.v1._proxy.Proxy(session)
get_account_metadata()

Get metatdata for this account.

Return type:Container
set_account_metadata(container)

Set metatdata for this account.

Parameters:container (Container) – Account metadata specified on a Container object to be sent to the server.
Return type:None
containers(limit=None, marker=None, **kwargs)

Obtain Container objects for this account.

Parameters:
  • limit (int) – Set the limit of how many containers to retrieve in each request to the server. By default, the value is None, retrieving the maximum amount of containers per request that your server allows.
  • marker (str) – The name of the container to begin iterating from. By default, the value is None, returning all available containers.
Return type:

A generator of Container objects.

get_container_metadata(container)

Get metatdata for a container.

Parameters:container (Container) – The container to retreive metadata for. You can pass a container object or the name of a container to retrieve metadata for.
Return type:Container
Raises:ValueError when an unnamed container object was specified, as this would instead retrieve account metadata.
set_container_metadata(container)

Set metatdata for a container.

Parameters:container (Container) – A container object containing metadata to be set.
Return type:None
create_container(container)

Create a container,

Parameters:container (Container) – The container to create. You can pass a container object or the name of a container to create.
Return type:Container
delete_container(container)

Delete a container.

Parameters:container (Container) – The container to delete. You can pass a container object or the name of a container to delete.
Return type:None
objects(container, limit=None, marker=None, **kwargs)

Return a generator that yields the Container’s objects.

Parameters:container (Container) – A container object or the name of a container that you want to retrieve objects from.
Return type:A generator of Object objects.
get_object_data(obj)

Retreive the data contained inside an object.

Parameters:obj (Object) – The object to retreive.
save_object(obj, path)

Save the data contained inside an object to disk.

Parameters:
  • obj (Object) – The object to save to disk.
  • str (path) – Location to write the object contents.
create_object(data, obj, container=None, **kwargs)

Create an object within the object store.

Parameters:
  • data – The data to store.
  • obj (Object) – The name of the object to create, or an obj.Object
copy_object()

Copy an object.

delete_object(obj)

Delete an object.

Parameters:obj (Object) – The object to delete.
Return type:None
get_object_metadata(obj)

Get metatdata for an object.

Parameters:obj (Object) – The object to retreive metadata from.
Returns:A Object populated with the server’s response.
set_object_metadata(obj)

Set metatdata for an object.

Parameters:obj (Object) – The object to set metadata for.
Return type:None

Table Of Contents

Previous topic

UserPreference

Next topic

Compute Resources

This Page