def add_vrf(arg, opts, shell_opts):
v = VRF()<EOL>v.rt = opts.get('<STR_LIT>')<EOL>v.name = opts.get('<STR_LIT:name>')<EOL>v.description = opts.get('<STR_LIT:description>')<EOL>v.tags = list(csv.reader([opts.get('<STR_LIT>', '<STR_LIT>')], escapechar='<STR_LIT:\\>'))[<NUM_LIT:0>]<EOL>for avp in opts.get('<STR_LIT>', []):<EOL><INDENT>try:<EOL><INDENT>key, value = avp.split('<STR_LIT:=>', <NUM_LIT:1>)<EOL><DEDENT>except ValueError:<EOL><INDENT>print("<STR_LIT>" % avp, file=sys.stderr)<EOL>return<EOL><DEDENT>v.avps[key] = value<EOL><DEDENT>try:<EOL><INDENT>v.save()<EOL><DEDENT>except pynipap.NipapError as exc:<EOL><INDENT>print("<STR_LIT>" % str(exc), file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>print("<STR_LIT>" % (vrf_format(v)))<EOL>
Add VRF to NIPAP