congress.datasources.ironic_driver.
IronicDriver
(name='', args=None)¶Bases: congress.datasources.datasource_driver.PollingDataSourceDriver
, congress.datasources.datasource_driver.ExecutionDriver
ACTIVE_HOSTS
= 'active_hosts'¶CHASSISES
= 'chassises'¶DRIVERS
= 'drivers'¶NODES
= 'nodes'¶NODE_PROPERTIES
= 'node_properties'¶PORTS
= 'ports'¶TRANSLATORS
= [{'table-name': 'chassises', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'nodes', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'chassis_uuid', 'col': 'owner_chassis', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'power_state', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'maintenance', 'desc': ''}, {'translator': {'in-list': False, 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT', 'parent-key': 'id', 'parent-col-name': 'properties', 'table-name': 'node_properties', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'memory_mb'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'cpu_arch'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'local_gb'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'cpus'})}, 'fieldname': 'properties', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'driver'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'instance_uuid', 'col': 'running_instance'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'provision_updated_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'ports', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'node_uuid', 'col': 'owner_node'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'address', 'col': 'mac_address'}, {'translator': {'extract-fn': <function safe_port_extra>, 'translation-type': 'VALUE'}, 'fieldname': 'extra', 'col': 'vif_port_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'drivers', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translator': {'translation-type': 'VALUE'}, 'val-col': 'hosts', 'translation-type': 'LIST', 'parent-key': 'name', 'parent-col-name': 'name', 'table-name': 'active_hosts'}, 'fieldname': 'hosts'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}]¶chassises_translator
= {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'chassises', 'translation-type': 'HDICT'}¶drivers_translator
= {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translator': {'translation-type': 'VALUE'}, 'val-col': 'hosts', 'translation-type': 'LIST', 'parent-key': 'name', 'parent-col-name': 'name', 'table-name': 'active_hosts'}, 'fieldname': 'hosts'}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'drivers', 'translation-type': 'HDICT'}¶execute
(action, action_args)¶Overwrite ExecutionDriver.execute().
get_datasource_info
()¶get_ironic_credentials
(creds)¶initialize_update_methods
()¶nodes_translator
= {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'chassis_uuid', 'col': 'owner_chassis', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'power_state', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'maintenance', 'desc': ''}, {'translator': {'in-list': False, 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT', 'parent-key': 'id', 'parent-col-name': 'properties', 'table-name': 'node_properties', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'memory_mb'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'cpu_arch'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'local_gb'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'cpus'})}, 'fieldname': 'properties', 'desc': ''}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'driver'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'instance_uuid', 'col': 'running_instance'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'provision_updated_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'nodes', 'translation-type': 'HDICT'}¶ports_translator
= {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'uuid', 'col': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'node_uuid', 'col': 'owner_node'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'address', 'col': 'mac_address'}, {'translator': {'extract-fn': <function safe_port_extra at 0x7faa465aacf8>, 'translation-type': 'VALUE'}, 'fieldname': 'extra', 'col': 'vif_port_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'created_at'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'updated_at'}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'ports', 'translation-type': 'HDICT'}¶safe_id
()¶safe_port_extra
()¶value_trans
= {'translation-type': 'VALUE'}¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.