def make_interface_child(device_name, interface_name, parent_name):
    '''
    .. versionadded:: 2019.2.0

    Set an interface as part of a LAG.

    device_name
        The name of the device, e.g., ``edge_router``.

    interface_name
        The name of the interface to be attached to LAG, e.g., ``xe-1/0/2``.

    parent_name
        The name of the LAG interface, e.g., ``ae13``.

    CLI Example:

    .. code-block:: bash

        salt myminion netbox.make_interface_child xe-1/0/2 ae13
    '''
    nb_device = get_('dcim', 'devices', name=device_name)
    nb_parent = get_('dcim', 'interfaces', device_id=nb_device['id'], name=parent_name)
    if nb_device and nb_parent:
        return update_interface(device_name, interface_name, lag=nb_parent['id'])
    else:
        return False
def make_interface_child ( device_name , interface_name , parent_name ) : nb_device = get_ ( 'dcim' , 'devices' , name = device_name ) nb_parent = get_ ( 'dcim' , 'interfaces' , device_id = nb_device [ 'id' ] , name = parent_name ) if nb_device and nb_parent : return update_interface ( device_name , interface_name , lag = nb_parent [ 'id' ] ) else : return False
.. versionadded:: 2019.2.0

    Set an interface as part of a LAG.

    device_name
        The name of the device, e.g., ``edge_router``.

    interface_name
        The name of the interface to be attached to LAG, e.g., ``xe-1/0/2``.

    parent_name
        The name of the LAG interface, e.g., ``ae13``.

    CLI Example:

    .. code-block:: bash

        salt myminion netbox.make_interface_child xe-1/0/2 ae13