コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
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)
コード例 #4
0
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)
コード例 #5
0
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)
コード例 #6
0
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)
コード例 #7
0
def default():
    """Clear all BGP peers"""
    command = 'sudo vtysh -c "clear ip bgp *"'
    run_command(command)