Remove an IP address from an interface.

    All parameters left as ``None`` are ignored and thus no configuration
    action is taken for that parameter (left "as-is").

    :param enode: Engine node to communicate with.
    :type enode: topology.platforms.base.BaseNode
    :param str portlbl: Port label to configure. Port label will be mapped to
     real port automatically.
    :param str addr: IPv4 or IPv6 address to remove from the interface:
     - IPv4 address to remove from the interface in the form
     ``'192.168.20.20'`` or ``'192.168.20.20/24'``.
     - IPv6 address to remove from the interface in the form
     ``'2001::1'`` or ``'2001::1/120'``.
    :param str shell: Shell name to execute commands.
     If ``None``, use the Engine Node default shell.

def remove_ip(enode, portlbl, addr, shell=None):
    """
    Remove an IP address from an interface.

    All parameters left as ``None`` are ignored and thus no configuration
    action is taken for that parameter (left "as-is").

    :param enode: Engine node to communicate with.
    :type enode: topology.platforms.base.BaseNode
    :param str portlbl: Port label to configure. Port label will be mapped to
     real port automatically.
    :param str addr: IPv4 or IPv6 address to remove from the interface:
     - IPv4 address to remove from the interface in the form
     ``'192.168.20.20'`` or ``'192.168.20.20/24'``.
     - IPv6 address to remove from the interface in the form
     ``'2001::1'`` or ``'2001::1/120'``.
    :param str shell: Shell name to execute commands.
     If ``None``, use the Engine Node default shell.
    """
    assert portlbl
    assert ip_interface(addr)
    port = enode.ports[portlbl]

    cmd = 'ip addr del {addr} dev {port}'.format(addr=addr, port=port)
    response = enode(cmd, shell=shell)
    assert not response