def vrf_attr_remove(arg, opts, shell_opts):
if arg is None:<EOL><INDENT>print("<STR_LIT>", file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if arg.lower() in ('<STR_LIT:->', '<STR_LIT:none>'):<EOL><INDENT>arg = None<EOL><DEDENT>try:<EOL><INDENT>v = VRF.search({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': arg }<EOL>)['<STR_LIT:result>'][<NUM_LIT:0>]<EOL><DEDENT>except (KeyError, IndexError):<EOL><INDENT>print("<STR_LIT>" % str(arg), file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>for key in opts.get('<STR_LIT>', []):<EOL><INDENT>if key not in v.avps:<EOL><INDENT>print("<STR_LIT>" % key, file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>del v.avps[key]<EOL><DEDENT>try:<EOL><INDENT>v.save()<EOL><DEDENT>except 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>
Remove attributes from a prefix