def list_vrf(arg, opts, shell_opts):

    search_string = ''
    if type(arg) == list or type(arg) == tuple:
        search_string = ' '.join(arg)

    offset = 0
    limit = 100
    while True:
        res = VRF.smart_search(search_string, { 'offset': offset, 'max_result': limit })
        if offset == 0:
            if shell_opts.show_interpretation:
                print "Query interpretation:"
                _parse_interp_vrf(res['interpretation'])

            if len(res['result']) == 0:
                print "No VRFs matching '%s' found." % search_string
                return

            print "%-16s %-22s %-2s %-40s" % ("VRF RT", "Name", "#", "Description")
            print "--------------------------------------------------------------------------------"

        for v in res['result']:
            tags = '-'
            if len(v.tags) > 0:
                tags = '#%d' % len(v.tags)
            if len(unicode(v.description)) > 100:
                desc = v.description[0:97] + "..."
            else:
                desc = v.description
            print "%-16s %-22s %-2s %-40s" % (v.rt or '-', v.name, tags, desc)

        if len(res['result']) < limit:
            break
        offset += limit
List VRFs matching a search criteria
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-cli/nipap_cli/nipap_cli.py/list_vrf