designateclient.utils module

class designateclient.utils.AdapterWithTimeout(*args, **kw)[source]

Bases: Adapter

adapter.Adapter wraps around a Session.

The user can pass a timeout keyword that will apply only to the Designate Client, in order:

  • timeout keyword passed to request()

  • timeout keyword passed to AdapterWithTimeout()

  • timeout attribute on keystone session

request(*args, **kwargs)[source]
designateclient.utils.find_resourceid_by_name_or_id(resource_client, name_or_id)[source]

Find resource id from its id or name.

designateclient.utils.get_columns(data)[source]

Some row’s might have variable count of columns, ensure that we have the same.

Parameters:

data – Results in [{}, {]}]

designateclient.utils.get_item_properties(item, fields, mixed_case_fields=(), formatters=None)[source]

Return a tuple containing the item properties.

Parameters:
  • item – a single item resource (e.g. Server, Tenant, etc)

  • fields – tuple of strings with the desired field names

  • mixed_case_fields – tuple of field names to preserve case

  • formatters – dictionary mapping field names to callables to format the values