def get_current_vrfs(self):
<EOL>cur_vrfs = list(session.get('<STR_LIT>', {}).items())<EOL>if len(cur_vrfs) > <NUM_LIT:0>:<EOL><INDENT>q = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:id>',<EOL>'<STR_LIT>': cur_vrfs[<NUM_LIT:0>][<NUM_LIT:0>]<EOL>}<EOL>if len(cur_vrfs) > <NUM_LIT:1>:<EOL><INDENT>for vrf_id, vrf in cur_vrfs[<NUM_LIT:1>:]:<EOL><INDENT>q = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': q,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:id>',<EOL>'<STR_LIT>': vrf_id<EOL>}<EOL>}<EOL><DEDENT><DEDENT>res = VRF.search(q)<EOL>session['<STR_LIT>'] = {}<EOL>for vrf in res['<STR_LIT:result>']:<EOL><INDENT>session['<STR_LIT>'][vrf.id] = { '<STR_LIT:id>': vrf.id, '<STR_LIT>': vrf.rt,<EOL>'<STR_LIT:name>': vrf.name, '<STR_LIT:description>': vrf.description }<EOL><DEDENT>session.save()<EOL><DEDENT>return json.dumps(session.get('<STR_LIT>', {}))<EOL>
Return VRF filter list from session variable

            Before returning list, make a search for all VRFs currently in the
            list to verify that they still exist.