Beispiel #1
0
def ping(source):
    """Render OSPF configuration/Form"""

    reformat_interface = source.replace('%2f', '/')
    vrfs = GetInfo.get_vrfs(netmiko_session)

    return render_template('ping.html', source=reformat_interface, vrfs=vrfs)
Beispiel #2
0
def modify_inteface(interface):
    """POST BGP configuration from form data"""

    reformat_interface = interface.replace('%2f', '/')
    vrfs = GetInfo.get_vrfs(netmiko_session)

    return render_template('modify_interface.html', interface=reformat_interface, vrfs=vrfs, mgmt_int=management_int)
Beispiel #3
0
def new_interface():
    """POST BGP configuration from form data"""

    vrfs = GetInfo.get_vrfs(netmiko_session)

    return render_template('new_int_form.html',
                           interfaces=unassigned_ints,
                           vrfs=vrfs,
                           interface_numbers=interface_nums)
Beispiel #4
0
def modify_inteface(interface):
    """POST BGP configuration from form data"""

    reformat_interface = interface.replace('%2f', '/')
    vrfs = GetInfo.get_vrfs(netmiko_session)
    mac = GetInterfacesInfo.get_single_interfaces(netconf_session,
                                                  reformat_interface)

    return render_template('modify_interface.html',
                           interface=reformat_interface,
                           vrfs=vrfs,
                           mgmt_int=management_int,
                           mac=mac[0].get(reformat_interface).get('MAC'))