def edit_vrf(self, id):

        try:
            v = VRF.get(int(id))
        except NipapError, e:
            return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})

        if 'rt' in request.params:
            if request.params['rt'].strip() != '':
                v.rt = request.params['rt'].strip()
            else:
                v.rt = None
        if 'name' in request.params:
            if request.params['name'].strip() != '':
                v.name = request.params['name'].strip()
            else:
                v.name = None
        if 'description' in request.params:
            v.description = request.params['description']
        if 'tags' in request.params:
            v.tags = json.loads(request.params['tags'])

        if 'avps' in request.params:
            v.avps = json.loads(request.params['avps'])

        try:
            v.save()
        except NipapError, e:
            return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})

        return json.dumps(v, cls=NipapJSONEncoder)
Edit a VRF.
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-www/nipapwww/controllers/xhr.py/XhrController.edit_vrf