ironic.drivers.modules.inspector.hooks.validate_interfaces module

class ironic.drivers.modules.inspector.hooks.validate_interfaces.ValidateInterfacesHook[source]

Bases: InspectionHook

Hook to validate network interfaces.

preprocess(task, inventory, plugin_data)[source]

Hook to run before the main inspection data processing.

This hook is run even before sanity checks.

Parameters:
  • task – A TaskManager instance.

  • inventory – Hardware inventory information sent by the ramdisk. Must not be modified by the hook.

  • plugin_data – Plugin data sent by the ramdisk. May be modified by the hook.

Returns:

nothing.

ironic.drivers.modules.inspector.hooks.validate_interfaces.get_interfaces(node, inventory)[source]

Convert inventory to a dict with interfaces.

Returns:

dict interface name -> interface (for valid interfaces).

ironic.drivers.modules.inspector.hooks.validate_interfaces.get_pxe_mac(inventory)[source]

Get MAC address of the PXE interface.

ironic.drivers.modules.inspector.hooks.validate_interfaces.validate_interfaces(node, inventory, interfaces)[source]

Validate interfaces on correctness and suitability.

Returns:

dict interface name -> interface.