ironic.common.trait_based_networking.plan module¶
- ironic.common.trait_based_networking.plan.all_no_match(actions: list[RenderedAction]) bool[source]¶
Check if a list of actions contains only NoMatch actions
- ironic.common.trait_based_networking.plan.filter_out_attached_portlikes(portlikes: list[PrimordialPort], actions: list[AttachAction]) list[PrimordialPort][source]¶
Filters out attached portlikes based on generated attach actions
- ironic.common.trait_based_networking.plan.filter_traits_for_node(node: Node, traits: list[NetworkTrait]) list[NetworkTrait][source]¶
Return a list of NetworkTraits that apply to a node
- ironic.common.trait_based_networking.plan.is_no_match_list(actions: list[RenderedAction]) bool[source]¶
Check if a list contains only a NoMatch action
- ironic.common.trait_based_networking.plan.is_portlike_attached(portlike: Port | Portgroup) bool[source]¶
Check if a portlike is attached or not
- ironic.common.trait_based_networking.plan.order_traits(traits: list[NetworkTrait]) list[NetworkTrait][source]¶
Sort a list of traits in ascending trait.order
- ironic.common.trait_based_networking.plan.plan_network(network_trait: NetworkTrait, node_uuid: str, node_ports: list[Port], node_portgroups: list[Portgroup], node_networks: list[Network]) list[RenderedAction][source]¶
Plan the network of a node based on TBN traits
- Parameters:
network_trait – A single NetworkTrait to consider for planning.
node_uuid – The UUID of the node to which this plan applies.
ports – A list of Ports available to this node.
portgroups – A list of Portgroups available to this node.
node_networks – A list of networks available to this node.
- Returns:
A list of RenderedActions which should be executed by the
appropriate network driver.
- ironic.common.trait_based_networking.plan.plan_vif_attach(traits: list[NetworkTrait], task: TaskManager, vif_info: dict) list[RenderedAction][source]¶
Main entry point of TBN from _vif_attach_tbn in NeutronVIFPortIDMixIn
- Parameters:
traits – A list of NetworkTraits that apply to the node being considered.
task – A TaskManager which contains important information about the node and network objects available.
vif_info – Information about the network (aka vif) which TBN will use to plan actions.
- Returns:
A list of RenderedActions which should be executed by the
appropriate network driver.