def list_vrf(arg, opts, shell_opts):
search_string = '<STR_LIT>'<EOL>if type(arg) == list or type(arg) == tuple:<EOL><INDENT>search_string = '<STR_LIT:U+0020>'.join(arg)<EOL><DEDENT>offset = <NUM_LIT:0><EOL>limit = <NUM_LIT:100><EOL>while True:<EOL><INDENT>res = VRF.smart_search(search_string, { '<STR_LIT>': offset, '<STR_LIT>': limit })<EOL>if offset == <NUM_LIT:0>:<EOL><INDENT>if shell_opts.show_interpretation:<EOL><INDENT>print("<STR_LIT>")<EOL>_parse_interp_vrf(res['<STR_LIT>'])<EOL><DEDENT>if res['<STR_LIT:error>']:<EOL><INDENT>print("<STR_LIT>" % res['<STR_LIT>'])<EOL>return<EOL><DEDENT>if len(res['<STR_LIT:result>']) == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>" % search_string)<EOL>return<EOL><DEDENT>print("<STR_LIT>" % ("<STR_LIT>", "<STR_LIT:Name>", "<STR_LIT:#>", "<STR_LIT>"))<EOL>print("<STR_LIT>")<EOL><DEDENT>for v in res['<STR_LIT:result>']:<EOL><INDENT>tags = '<STR_LIT:->'<EOL>if len(v.tags) > <NUM_LIT:0>:<EOL><INDENT>tags = '<STR_LIT>' % len(v.tags)<EOL><DEDENT>if len(str(v.description)) > <NUM_LIT:100>:<EOL><INDENT>desc = v.description[<NUM_LIT:0>:<NUM_LIT>] + "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>desc = v.description<EOL><DEDENT>print("<STR_LIT>" % (v.rt or '<STR_LIT:->', v.name, tags, desc))<EOL><DEDENT>if len(res['<STR_LIT:result>']) < limit:<EOL><INDENT>break<EOL><DEDENT>offset += limit<EOL><DEDENT>
List VRFs matching a search criteria