heat.engine.clients.os.swift module

heat.engine.clients.os.swift module

class heat.engine.clients.os.swift.SwiftClientPlugin(context)[source]

Bases: ClientPlugin

OBJECT_STORE = 'object-store'
exceptions_module = <module 'swiftclient.exceptions' from '/usr/lib/python3/dist-packages/swiftclient/exceptions.py'>
get_files_from_container(files_container, files_to_skip=None)[source]

Gets the file contents from a container.

Get the file contents from the container in a files map. A list of files to skip can also be specified and those would not be downloaded from swift.

get_signal_url(container_name, obj_name, timeout=None)[source]

Turn on object versioning.

We can use a single TempURL for multiple signals and return a Swift TempURL.

get_temp_url(container_name, obj_name, timeout=None, method='PUT')[source]

Return a Swift TempURL.

is_client_exception(ex)[source]

Returns True if the current exception comes from the client.

is_conflict(ex)[source]

Returns True if the exception is a conflict.

is_not_found(ex)[source]

Returns True if the exception is a not-found.

is_over_limit(ex)[source]

Returns True if the exception is an over-limit.

is_valid_temp_url_path(path)[source]

Return True if path is a valid Swift TempURL path, False otherwise.

A Swift TempURL path must: - Be five parts, [‘’, ‘v1’, ‘account’, ‘container’, ‘object’] - Be a v1 request - Have account, container, and object values - Have an object value with more than just ‘/’s

Parameters:

path (string) – The TempURL path

parse_last_modified(lm)[source]

Parses the last-modified value.

For example, last-modified values from a swift object header. Returns the datetime.datetime of that value.

Parameters:

lm (string) – The last-modified value (or None)

Returns:

An offset-naive UTC datetime of the value (or None)

service_types = ['object-store']
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.