The ironic_inspector.utils Module

exception ironic_inspector.utils.Error(msg, code=400, log_level='error', **kwargs)[source]

Bases: exceptions.Exception

Inspector exception.

exception ironic_inspector.utils.NotFoundInCacheError(msg, code=404)[source]

Bases: ironic_inspector.utils.Error

Exception when node was not found in cache during processing.

class ironic_inspector.utils.ProcessingLoggerAdapter(logger, extra)[source]

Bases: oslo_log.log.KeywordArgumentAdapter

process(msg, kwargs)[source]
ironic_inspector.utils.add_auth_middleware(app)[source]

Add authentication middleware to Flask application.

Parameters:app – application.
ironic_inspector.utils.add_cors_middleware(app)[source]

Create a CORS wrapper

Attach ironic-inspector-specific defaults that must be included in all CORS responses.

Parameters:app – application
ironic_inspector.utils.check_auth(request)[source]

Check authentication on request.

Parameters:request – Flask request
Raises:utils.Error if access is denied
ironic_inspector.utils.executor()[source]

Return the current futures executor.

ironic_inspector.utils.getProcessingLogger(name)[source]
ironic_inspector.utils.get_auth_strategy()[source]
ironic_inspector.utils.get_ipmi_address_from_data(introspection_data)[source]
ironic_inspector.utils.get_pxe_mac(introspection_data)[source]
ironic_inspector.utils.is_valid_mac(address)[source]

Return whether given value is a valid MAC.

ironic_inspector.utils.processing_logger_prefix(data=None, node_info=None)[source]

Calculate prefix for logging.

Tries to use: * node UUID, * node PXE MAC, * node BMC address

Parameters:
  • data – introspection data
  • node_info – NodeInfo or ironic node object
Returns:

logging prefix as a string

Previous topic

The ironic_inspector.rules Module

Next topic

The ironic_inspector.version Module

Project Source

This Page