def default(ipaddress): """Clear BGP neighbors soft configuration""" if ipaddress is not None: command = 'sudo vtysh -c "clear ip bgp {} soft "'.format(ipaddress) else: command = 'sudo vtysh -c "clear ip bgp * soft"' run_command(command)
def soft_in(ipaddress): """Send route-refresh""" if ipaddress is not None: command = 'sudo vtysh -c "clear ip bgp {} soft in"'.format(ipaddress) else: command = 'sudo vtysh -c "clear ip bgp * soft in"' run_command(command)
def neigh_out(ipaddress): """Resend all outbound updates""" if ipaddress is not None: command = 'sudo vtysh -c "clear ip bgp {} out"'.format(ipaddress) else: command = 'sudo vtysh -c "clear ip bgp * out"' run_command(command)
def default(ipaddress): """Clear all BGP peers""" if ipaddress is not None: command = 'sudo vtysh -c "clear ip bgp {} "'.format(ipaddress) else: command = 'sudo vtysh -c "clear ip bgp *"' run_command(command)
def neigh_in(ipaddress): """Send route-refresh""" if ipaddress is not None: command = 'sudo vtysh -c "clear ipv6 bgp {} in"'.format(ipaddress) else: command = 'sudo vtysh -c "clear ipv6 bgp * in"' run_command(command)
def soft_out(ipaddress): """Resend all outbound updates""" if ipaddress is not None: command = 'sudo vtysh -c "clear ipv6 bgp {} soft out"' \ .format(ipaddress) else: command = 'sudo vtysh -c "clear ipv6 bgp * soft out"' run_command(command)
def default(): """Clear all BGP peers""" command = 'sudo vtysh -c "clear ip bgp *"' run_command(command)