Module Expr Str Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr Num NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr Num NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr Num NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr Num NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore CompareNotIn Str NameLoad Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad keyword Call AttributeLoad NameLoad attr Num Return Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListLoad Str NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list
N/A N/A Module for working with EOS MLAG resources

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

Parameters:

    config (dict): The global MLAG configuration values

    interfaces (dict): The configured MLAG interfaces

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

 N/A re pyeapi.api Entity Mlag N/A Entity N/A N/A 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 N/A N/A self N/A N/A N/A Returns the Mlag configuration as a resource dict

        Returns:
            dict: A dict ojbect containing the Mlag resource attributes.
         N/A resource N/A dict N/A N/A N/A resource update N/A N/A self _parse_config N/A N/A N/A resource update N/A N/A self _parse_interfaces N/A resource N/A _parse_config N/A N/A self N/A N/A N/A Parses the mlag global configuration

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A config N/A N/A self get_block mlag configuration N/A cfg N/A dict N/A N/A N/A cfg update N/A N/A self _parse_domain_id config N/A N/A N/A cfg update N/A N/A self _parse_local_interface config N/A N/A N/A cfg update N/A N/A self _parse_peer_address config N/A N/A N/A cfg update N/A N/A self _parse_peer_link config N/A N/A N/A cfg update N/A N/A self _parse_shutdown config N/A N/A dict config cfg N/A _parse_domain_id N/A N/A self config N/A N/A N/A Scans the config block and parses the domain-id value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A match N/A N/A re search domain-id (.+)$ config N/A value N/A match N/A N/A match group 1 None N/A N/A dict domain_id value N/A _parse_local_interface N/A N/A self config N/A N/A N/A Scans the config block and parses the local-interface value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A match N/A N/A re search local-interface (\w+) config N/A value N/A match N/A N/A match group 1 None N/A N/A dict local_interface value N/A _parse_peer_address N/A N/A self config N/A N/A N/A Scans the config block and parses the peer-address value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A match N/A N/A re search peer-address ([^\s]+) config N/A value N/A match N/A N/A match group 1 None N/A N/A dict peer_address value N/A _parse_peer_link N/A N/A self config N/A N/A N/A Scans the config block and parses the peer-link value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A match N/A N/A re search peer-link (\S+) config N/A value N/A match N/A N/A match group 1 None N/A N/A dict peer_link value N/A _parse_shutdown N/A N/A self config N/A N/A N/A Scans the config block and parses the shutdown value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
         N/A value N/A no shutdown config N/A N/A dict shutdown value N/A _parse_interfaces N/A N/A self N/A N/A N/A Scans the global config and returns the configured interfaces

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict.
         N/A interfaces N/A dict N/A names N/A N/A re findall ^interface (Po.+)$ N/A self config N/A re M N/A name names N/A N/A config N/A N/A self get_block N/A interface %s name N/A match N/A N/A re search mlag (\d+) config N/A match N/A N/A N/A interfaces N/A name N/A dict mlag_id N/A N/A match group 1 N/A N/A dict interfaces interfaces N/A _configure_mlag N/A N/A self string value default disable N/A N/A N/A cfg N/A N/A self command_builder string value value default default disable disable N/A cmds N/A mlag configuration cfg N/A N/A N/A N/A super Mlag self configure cmds N/A set_domain_id N/A N/A self value default disable N/A None False False N/A N/A Configures the mlag domain-id value

        Args:
            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:
            bool: Returns True if the commands complete successfully
         N/A N/A N/A self _configure_mlag domain-id value default disable N/A set_local_interface N/A N/A self value default disable N/A None False False N/A N/A Configures the mlag local-interface value

        Args:
            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:
            bool: Returns True if the commands complete successfully
         N/A N/A N/A self _configure_mlag local-interface value default disable N/A set_peer_address N/A N/A self value default disable N/A None False False N/A N/A Configures the mlag peer-address value

        Args:
            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:
            bool: Returns True if the commands complete successfully
         N/A N/A N/A self _configure_mlag peer-address value default disable N/A set_peer_link N/A N/A self value default disable N/A None False False N/A N/A Configures the mlag peer-link value

        Args:
            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:
            bool: Returns True if the commands complete successfully
         N/A N/A N/A self _configure_mlag peer-link value default disable N/A set_shutdown N/A N/A self default disable N/A False True N/A N/A 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.

        Args:
            default (bool): Configures the shutdown using the
                default keyword
            disable (bool): Negates shutdown using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
         N/A N/A N/A self _configure_mlag shutdown True default disable N/A set_mlag_id N/A N/A self name value default disable N/A None False False N/A N/A Configures the interface mlag value for the specified interface

        Args:
            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:
            bool: Returns True if the commands complete successfully
         N/A cmd N/A N/A self command_builder mlag value value default default disable disable N/A N/A N/A self configure_interface name cmd N/A N/A instance N/A N/A node N/A N/A N/A Returns an instance of Mlag

    Args:
        node (Node): The node argument passes an instance of Node to the
            resource

    Returns:
        object: An instance of Mlag
     N/A N/A Mlag node N/A