Mlag

Module for working with EOS MLAG resources

The Mlag resource provides configuration management of global and interface MLAG settings on an EOS node.

param config:The global MLAG configuration values
type config:dict
param interfaces:
 The configured MLAG interfaces
type interfaces:
 dict
Config Parameters:
domain_id (str): The domain_id parameter is parsed from the nodes
mlag configuration. The domain id is an alphanumeric string that names the MLAG domain
local_interface (str): The local VLAN interface used as the control
plane endpoint between MLAG peers. Valid values include any VLAN SVI
peer_address (str): The IP address of the MLAG peer used to send MLAG
control traffic. The peer address must be reachable from the local interface. Valid values include any IPv4 unicast address
peer_link (str): The physical link that connects the node to its MLAG
peer. Valid values for the peer link include layer 2 Ethernet or Port-Channel interfaces

shutdown (bool): The administrative state of the global MLAG process.

Interface Parameters:
mlag_id (str): The interface mlag parameter parsed from the nodes
interface configuration. Valid values for the mlag id are in the range of 1 to 2000
class pyeapi.api.mlag.Mlag(node)

Bases: pyeapi.api.abstract.Entity

The Mlag class provides management of the MLAG configuration

The Mlag class is derived from Entity and provides an API for working with the nodes MLAG configuraiton.

get()

Returns the Mlag configuration as a resource dict

Returns:A dict ojbect containing the Mlag resource attributes.
Return type:dict
set_domain_id(value=None, default=False, disable=False)

Configures the mlag domain-id value

Parameters:
  • value (str) – The value to configure the domain-id
  • default (bool) – Configures the domain-id using the default keyword
  • disable (bool) – Negates the domain-id using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

set_local_interface(value=None, default=False, disable=False)

Configures the mlag local-interface value

Parameters:
  • value (str) – The value to configure the local-interface
  • default (bool) – Configures the local-interface using the default keyword
  • disable (bool) – Negates the local-interface using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

set_mlag_id(name, value=None, default=False, disable=False)

Configures the interface mlag value for the specified interface

Parameters:
  • name (str) – The interface to configure. Valid values for the name arg include Port-Channel*
  • value (str) – The mlag identifier to cofigure on the interface
  • default (bool) – Configures the interface mlag value using the default keyword
  • disable (bool) – Negates the interface mlag value using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

set_peer_address(value=None, default=False, disable=False)

Configures the mlag peer-address value

Parameters:
  • value (str) – The value to configure the peer-address
  • default (bool) – Configures the peer-address using the default keyword
  • disable (bool) – Negates the peer-address using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

Configures the mlag peer-link value

Parameters:
  • value (str) – The value to configure the peer-link
  • default (bool) – Configures the peer-link using the default keyword
  • disable (bool) – Negates the peer-link using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

set_shutdown(default=False, disable=True)

Configures the mlag shutdown value

Default setting for set_shutdown is disable=True, meaning ‘no shutdown’. Setting both default and disable to False will effectively enable shutdown.

Parameters:
  • default (bool) – Configures the shutdown using the default keyword
  • disable (bool) – Negates shutdown using the no keyword
Returns:

Returns True if the commands complete successfully

Return type:

bool

pyeapi.api.mlag.instance(node)

Returns an instance of Mlag

Parameters:node (Node) – The node argument passes an instance of Node to the resource
Returns:An instance of Mlag
Return type:object