The congress.datasources.cinder_driver Module

class congress.datasources.cinder_driver.CinderDriver(name='', args=None)

Bases: congress.datasources.datasource_driver.PollingDataSourceDriver, congress.datasources.datasource_driver.ExecutionDriver

SERVICES = 'services'
SNAPSHOTS = 'snapshots'
TRANSLATORS = [{'selector-type': 'DOT_SELECTOR', 'table-name': 'volumes', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'size', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'user_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'bootable', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'volume_type', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DOT_SELECTOR', 'table-name': 'snapshots', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'size', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'volume_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DOT_SELECTOR', 'table-name': 'services', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'binary', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'zone', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'host', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'disabled_reason', 'translator': {'translation-type': 'VALUE'}})}]
VOLUMES = 'volumes'
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_method()
services_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'services', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'binary', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'zone', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'host', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'disabled_reason', 'translator': {'translation-type': 'VALUE'}})}
snapshots_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'snapshots', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'size', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'volume_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}})}
value_trans = {'translation-type': 'VALUE'}
volumes_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'volumes', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'size', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'user_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'bootable', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'volume_type', 'translator': {'translation-type': 'VALUE'}})}