The freezerclient.utils Module

The freezerclient.utils Module

class freezerclient.utils.CachedProperty(func)[source]

Bases: object

class freezerclient.utils.Namespace(obj={})[source]

Bases: dict

A dict subclass that exposes its items as attributes.

Warning: Namespace instances do not have direct access to the dict methods.

static delattr(ns, name)[source]
classmethod from_mapping(ns, names=None)[source]
classmethod from_object(obj, names=None)[source]
classmethod from_sequence(seq, names=None)[source]
static getattr(ns, name)[source]
static hasattr(ns, name)[source]
static setattr(ns, name, value)[source]
freezerclient.utils.create_headers_for_request(token)[source]

Create a header dict to be passed to the api.

Parameters:token – token string coming from the api
Returns:a dict containing all the headers for a request
freezerclient.utils.doc_from_json_file(path_to_file)[source]

Build a json from a file in the file system :param path_to_file: path to file :return: in memory file in json format

Return a search term that the api can use to query the db :param search_term: string :return: search dict

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.