def vrf_attr_remove(arg, opts, shell_opts):

    if arg is None:
        print >> sys.stderr, "ERROR: Please specify the RT of the VRF to view."
        sys.exit(1)

    # interpret as default VRF (ie, RT = None)
    if arg.lower() in ('-', 'none'):
        arg = None

    try:
        v = VRF.search({
            'val1': 'rt',
            'operator': 'equals',
            'val2': arg }
            )['result'][0]
    except (KeyError, IndexError):
        print >> sys.stderr, "VRF with [RT: %s] not found." % str(arg)
        sys.exit(1)

    for key in opts.get('extra-attribute', []):
        if key not in v.avps:
            print >> sys.stderr, "Unable to remove extra-attribute: '%s' does not exist." % key
            sys.exit(1)

        del v.avps[key]

    try:
        v.save()
    except NipapError as exc:
        print >> sys.stderr, "Could not save VRF changes: %s" % str(exc)
        sys.exit(1)

    print "%s saved." % vrf_format(v)
Remove attributes from a prefix
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-cli/nipap_cli/nipap_cli.py/vrf_attr_remove