ironic.common.trait_based_networking.plan module

ironic.common.trait_based_networking.plan.all_no_match(actions)[source]

Check if a list of actions contains only NoMatch actions

ironic.common.trait_based_networking.plan.filter_out_attached_portlikes(portlikes, actions)[source]

Filters out attached portlikes based on generated attach actions

ironic.common.trait_based_networking.plan.filter_out_grouped_ports(portlikes, actions)[source]

Filters out ports that have been used to form dynamic portgroups

ironic.common.trait_based_networking.plan.filter_traits_for_node(node, traits)[source]

Return a list of NetworkTraits that apply to a node

ironic.common.trait_based_networking.plan.is_no_match_list(actions)[source]

Check if a list contains only a NoMatch action

ironic.common.trait_based_networking.plan.is_portlike_attached(portlike)[source]

Check if a portlike is attached or not

ironic.common.trait_based_networking.plan.order_traits(traits)[source]

Sort a list of traits in ascending trait.order

ironic.common.trait_based_networking.plan.plan_network(network_trait, node_uuid, node_ports, node_portgroups, node_networks)[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, task, vif_info)[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.