예제 #1
0
def read_interfaces(crud_service, provider):

    interfaces_filter = Interfaces()

    try:
        interfaces = crud_service.read(provider, interfaces_filter)
        for interface in interfaces.interface:
            print_interface(interface)
    except YPYError:
        print('An error occurred reading interfaces.')
예제 #2
0
def read_interfaces(crud_service, provider):

    interfaces_filter = Interfaces()

    try:
        interfaces = crud_service.read(provider, interfaces_filter)
        if interfaces:
            for interface in interfaces.interface:
                print_interface(interface)
        else:
            print('There are no interfaces in the configuration.')
    except YError:
        print('An error occurred reading interfaces.')