def add_current_vrf(self):
vrf_id = request.json['<STR_LIT>']<EOL>if vrf_id is not None:<EOL><INDENT>if vrf_id == '<STR_LIT:null>':<EOL><INDENT>vrf = VRF()<EOL><DEDENT>else:<EOL><INDENT>vrf_id = int(vrf_id)<EOL>vrf = VRF.get(vrf_id)<EOL><DEDENT>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>session.save()<EOL><DEDENT>return json.dumps(session.get('<STR_LIT>', {}))<EOL>
Add VRF to filter list session variable