The congress.datasources.cinder_driver Module¶
Schema version history
version: 2.1 date: 2016-03-27 changes:
- Added columns to the volumes table: encrypted, availability_zone, replication_status, multiattach, snapshot_id, source_volid, consistencygroup_id, migration_status
 - Added the attachments table for volume attachment information.
 
version: 2.0 Initial schema version.
- 
class 
congress.datasources.cinder_driver.CinderDriver(name=”, args=None)¶ Bases:
congress.datasources.datasource_driver.PollingDataSourceDriver,congress.datasources.datasource_driver.ExecutionDriver- 
ATTACHMENTS= ‘attachments’¶ 
- 
SERVICES= ‘services’¶ 
- 
SNAPSHOTS= ‘snapshots’¶ 
- 
TRANSLATORS= [{‘table-name’: ‘volumes’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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’}}, {‘fieldname’: ‘encrypted’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘availability_zone’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘replication_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘multiattach’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘snapshot_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘source_volid’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘consistencygroup_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘migration_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘attachments’, ‘translator’: {‘table-name’: ‘attachments’, ‘val-col-desc’: ‘List of attachments’, ‘parent-key-desc’: ‘UUID of volume’, ‘parent-key’: ‘id’, ‘parent-col-name’: ‘volume_id’, ‘translation-type’: ‘LIST’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘val-col’: ‘attachment’}})}, {‘table-name’: ‘snapshots’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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’}})}, {‘table-name’: ‘services’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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= {‘table-name’: ‘services’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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= {‘table-name’: ‘snapshots’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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= {‘table-name’: ‘volumes’, ‘selector-type’: ‘DOT_SELECTOR’, ‘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’}}, {‘fieldname’: ‘encrypted’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘availability_zone’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘replication_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘multiattach’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘snapshot_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘source_volid’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘consistencygroup_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘migration_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘attachments’, ‘translator’: {‘table-name’: ‘attachments’, ‘val-col-desc’: ‘List of attachments’, ‘parent-key-desc’: ‘UUID of volume’, ‘parent-key’: ‘id’, ‘parent-col-name’: ‘volume_id’, ‘translation-type’: ‘LIST’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘val-col’: ‘attachment’}})}¶ 
-