autonet_cumulus.tasks.lag

Module Contents

Functions

get_evpn_es_map(show_evpn_es_data: dict) → dict

Parses the output of the show evpn es command into a

get_lags(show_bonds_data: dict, show_evpn_es_data: dict = None, bond_name: str = None) → [autonet.core.objects.lag.LAG]

Returns a list of LAGs configured on the device.

generate_lag_esi_commands(lag: autonet.core.objects.lag.LAG) → [str]

Generate the commands required to set a Type 3 ESI.

generate_create_lag_commands(lag: autonet.core.objects.lag.LAG) → [str]

Generate a list of commands needed to create a new

generate_update_lag_commands(lag: autonet.core.objects.lag, original_lag: autonet.core.objects.lag, update: bool) → [str]

Generate a list of commands to update or create a LAG, as

generate_delete_lag_commands(lag_name: str) → [str]

Generate a list of commands needed to delete a bond

autonet_cumulus.tasks.lag.get_evpn_es_map(show_evpn_es_data: dict) dict

Parses the output of the show evpn es command into a mapping of interface to ES value so that it can be easily referenced.

Parameters:

show_evpn_es_data – Output from the show evpn es command.

Returns:

autonet_cumulus.tasks.lag.get_lags(show_bonds_data: dict, show_evpn_es_data: dict = None, bond_name: str = None) [autonet.core.objects.lag.LAG]

Returns a list of LAGs configured on the device.

Parameters:
  • show_bonds_data – Output from the show interface bonds command.

  • show_evpn_es_data – Output from the show evpn es command.

  • bond_name – Filter results for the specified bond name.

Returns:

autonet_cumulus.tasks.lag.generate_lag_esi_commands(lag: autonet.core.objects.lag.LAG) [str]

Generate the commands required to set a Type 3 ESI.

Parameters:

lag – A LAG object.

Returns:

autonet_cumulus.tasks.lag.generate_create_lag_commands(lag: autonet.core.objects.lag.LAG) [str]

Generate a list of commands needed to create a new LAG interface.

Parameters:

lag – A LAG object.

Returns:

autonet_cumulus.tasks.lag.generate_update_lag_commands(lag: autonet.core.objects.lag, original_lag: autonet.core.objects.lag, update: bool) [str]

Generate a list of commands to update or create a LAG, as appropriate.

Parameters:
  • lag – A LAG object representing the desired bond configuration.

  • original_lag – A LAG object representing the current bond configuration.

  • update – When True no commands are generated for fields that are set to None.

Returns:

autonet_cumulus.tasks.lag.generate_delete_lag_commands(lag_name: str) [str]

Generate a list of commands needed to delete a bond interface.

Parameters:

lag_name – The name of the bond interface.

Returns: