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 = [{'table-name': 'volumes', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'snapshots', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'services', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}]
VOLUMES = 'volumes'
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_method()
services_translator = {'table-name': 'services', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}
snapshots_translator = {'table-name': 'snapshots', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}
value_trans = {'translation-type': 'VALUE'}
volumes_translator = {'table-name': 'volumes', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, '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'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}