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
= [{'translation-type': 'HDICT', 'table-name': 'chassises', 'selector-type': 'DOT_SELECTOR', 'field-translators': ({'fieldname': 'uuid', 'col': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}})}, {'translation-type': 'HDICT', 'table-name': 'nodes', 'selector-type': 'DOT_SELECTOR', 'field-translators': ({'fieldname': 'uuid', 'col': 'id', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'chassis_uuid', 'desc': '', 'col': 'owner_chassis', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'power_state', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'maintenance', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'properties', 'desc': '', 'translator': {'translation-type': 'HDICT', 'table-name': 'node_properties', 'parent-key': 'id', 'parent-col-name': 'properties', 'selector-type': 'DICT_SELECTOR', 'in-list': False, 'field-translators': ({'fieldname': 'memory_mb', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'cpu_arch', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'local_gb', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'cpus', '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', 'translator': {'translation-type': 'VALUE'}})}, {'translation-type': 'HDICT', 'table-name': 'ports', 'selector-type': 'DOT_SELECTOR', 'field-translators': ({'fieldname': 'uuid', 'col': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'node_uuid', 'col': 'owner_node', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'address', 'col': 'mac_address', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'extra', 'col': 'vif_port_id', 'translator': {'translation-type': 'VALUE', 'extract-fn': <function IronicDriver.safe_port_extra>}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}})}, {'translation-type': 'HDICT', 'table-name': 'drivers', 'selector-type': 'DOT_SELECTOR', 'field-translators': ({'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'hosts', 'translator': {'translation-type': 'LIST', 'table-name': 'active_hosts', 'parent-key': 'name', 'parent-col-name': 'name', 'val-col': 'hosts', 'translator': {'translation-type': 'VALUE'}}})}]¶chassises_translator
= {'field-translators': ({'fieldname': 'uuid', 'col': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'chassises', 'translation-type': 'HDICT'}¶drivers_translator
= {'field-translators': ({'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'hosts', 'translator': {'translation-type': 'LIST', 'table-name': 'active_hosts', 'parent-key': 'name', 'parent-col-name': 'name', 'val-col': 'hosts', 'translator': {'translation-type': 'VALUE'}}}), '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': ({'fieldname': 'uuid', 'col': 'id', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'chassis_uuid', 'desc': '', 'col': 'owner_chassis', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'power_state', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'maintenance', 'desc': '', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'properties', 'desc': '', 'translator': {'translation-type': 'HDICT', 'table-name': 'node_properties', 'parent-key': 'id', 'parent-col-name': 'properties', 'selector-type': 'DICT_SELECTOR', 'in-list': False, 'field-translators': ({'fieldname': 'memory_mb', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'cpu_arch', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'local_gb', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'cpus', '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', 'translator': {'translation-type': 'VALUE'}}), 'selector-type': 'DOT_SELECTOR', 'table-name': 'nodes', 'translation-type': 'HDICT'}¶ports_translator
= {'field-translators': ({'fieldname': 'uuid', 'col': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'node_uuid', 'col': 'owner_node', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'address', 'col': 'mac_address', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'extra', 'col': 'vif_port_id', 'translator': {'translation-type': 'VALUE', 'extract-fn': <function IronicDriver.safe_port_extra>}}, {'fieldname': 'created_at', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'updated_at', 'translator': {'translation-type': 'VALUE'}}), '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.