The congress.datasources.ironic_driver
Module¶
-
class
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
= [{‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘chassises’}, {‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘uuid’}, {‘col’: ‘owner_chassis’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘chassis_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘power_state’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘maintenance’}, {‘translator’: {‘selector-type’: ‘DICT_SELECTOR’, ‘parent-col-name’: ‘properties’, ‘in-list’: False, ‘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’}), ‘translation-type’: ‘HDICT’, ‘parent-key’: ‘id’, ‘table-name’: ‘node_properties’}, ‘desc’: ”, ‘fieldname’: ‘properties’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘driver’}, {‘col’: ‘running_instance’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘instance_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provision_updated_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘nodes’}, {‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘col’: ‘owner_node’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘node_uuid’}, {‘col’: ‘mac_address’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘address’}, {‘col’: ‘vif_port_id’, ‘translator’: {‘extract-fn’: <function safe_port_extra>, ‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘extra’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘ports’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘val-col’: ‘hosts’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘parent-col-name’: ‘name’, ‘translation-type’: ‘LIST’, ‘parent-key’: ‘name’, ‘table-name’: ‘active_hosts’}, ‘fieldname’: ‘hosts’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘drivers’}]¶
-
chassises_translator
= {‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘chassises’}¶
-
drivers_translator
= {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘val-col’: ‘hosts’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘parent-col-name’: ‘name’, ‘translation-type’: ‘LIST’, ‘parent-key’: ‘name’, ‘table-name’: ‘active_hosts’}, ‘fieldname’: ‘hosts’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘drivers’}¶
-
execute
(action, action_args)¶ Overwrite ExecutionDriver.execute().
-
static
get_datasource_info
()¶
-
get_ironic_credentials
(creds)¶
-
initialize_update_methods
()¶
-
nodes_translator
= {‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘uuid’}, {‘col’: ‘owner_chassis’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘chassis_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘power_state’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘desc’: ”, ‘fieldname’: ‘maintenance’}, {‘translator’: {‘selector-type’: ‘DICT_SELECTOR’, ‘parent-col-name’: ‘properties’, ‘in-list’: False, ‘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’}), ‘translation-type’: ‘HDICT’, ‘parent-key’: ‘id’, ‘table-name’: ‘node_properties’}, ‘desc’: ”, ‘fieldname’: ‘properties’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘driver’}, {‘col’: ‘running_instance’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘instance_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provision_updated_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘nodes’}¶
-
ports_translator
= {‘field-translators’: ({‘col’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘col’: ‘owner_node’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘node_uuid’}, {‘col’: ‘mac_address’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘address’}, {‘col’: ‘vif_port_id’, ‘translator’: {‘extract-fn’: <function safe_port_extra>, ‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘extra’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘created_at’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘updated_at’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DOT_SELECTOR’, ‘table-name’: ‘ports’}¶
-
safe_id
(x)¶
-
safe_port_extra
(x)¶
-
value_trans
= {‘translation-type’: ‘VALUE’}¶
-