ironic.drivers.modules.inspector.hooks.physical_network module

Port Physical Network Hook

class ironic.drivers.modules.inspector.hooks.physical_network.PhysicalNetworkHook[source]

Bases: InspectionHook

Hook to set the port’s physical_network field.

Set the ironic port’s physical_network field based on a CIDR to physical network mapping in the configuration.

__call__(task, inventory, plugin_data)[source]

Process inspection data and patch the port’s physical network.

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.

get_physical_network(interface)[source]

Return a physical network to apply to an ironic port.

Parameters:

interface – The interface from the inventory.

Returns:

The physical network to set, or None.