ironic.drivers.modules.inspector.hooks.ports module

class ironic.drivers.modules.inspector.hooks.ports.PortsHook[source]

Bases: InspectionHook

Hook to create ironic ports.

__call__(task, inventory, plugin_data)[source]

Hook to run to process inspection data (before Ironic node update).

This hook is run after node is found and ports are created, just before the node is updated with the data.

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.

dependencies = ['validate-interfaces']

An ordered list of hooks that must be enabled before this one.

The items here should be entry point names, not classes.

ironic.drivers.modules.inspector.hooks.ports.add_ports(task, interfaces)[source]

Add ports for all previously validated interfaces.

ironic.drivers.modules.inspector.hooks.ports.update_ports(task, all_interfaces, valid_macs)[source]

Update ports to match the valid MACs.

Depending on the value of [inspector]keep_ports, some ports may be removed.