@staticmethod
def config_statelink(unit, link_name, intf=None, ip_addr=None, ip_netmask=
    None, ip_addr_standby=None):
    """Configure HA stateful link
        
        :param link_name: Stateful link name to be assigned
        :param unit: unit that you want to apply the config
        :param intf: physical interface of stateful link
        :param ip_addr: Primary IP address of stateful link
        :param ip_netmask: Netmask of stateful IP
        :param ip_addr_standby: Standby IP address of stateful link
        :return: None

        """
    cmd = ''
    intf = intf or ''
    if intf:
        cmd += 'interface {intf}'.format(intf=intf)
        cmd += '\nno shutdown'
    cmd += '\nfailover link {link_name} {intf}'.format(link_name=link_name,
        intf=intf)
    if ip_addr and ip_netmask and ip_addr_standby:
        if ':' in ip_addr:
            cmd += (
                '\nfailover interface ip statelink {ip}/{mask} standby {standby}'
                .format(ip=ip_addr, mask=ip_netmask, standby=ip_addr_standby))
        else:
            cmd += (
                '\nfailover interface ip statelink {ip} {mask} standby {standby}'
                .format(ip=ip_addr, mask=ip_netmask, standby=ip_addr_standby))
    unit.config(cmd, exception_on_bad_config=True)
