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