def add_pool(self):

        # extract attributes
        p = Pool()
        p.name = request.params.get('name')
        p.description = request.params.get('description')
        p.default_type = request.params.get('default_type')
        if 'ipv4_default_prefix_length' in request.params:
            if request.params['ipv4_default_prefix_length'].strip() != '':
                p.ipv4_default_prefix_length = request.params['ipv4_default_prefix_length']
        if 'ipv6_default_prefix_length' in request.params:
            if request.params['ipv6_default_prefix_length'].strip() != '':
                p.ipv6_default_prefix_length = request.params['ipv6_default_prefix_length']
        if 'tags' in request.params:
            p.tags = json.loads(request.params['tags'])
        if 'avps' in request.params:
            p.avps = json.loads(request.params['avps'])

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

        return json.dumps(p, cls=NipapJSONEncoder)
Invoked like a view and does the profile handling.
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-www/nipapwww/controllers/xhr.py/XhrController.add_pool--crossover with--dataset/ETHPy150Open mitsuhiko/solace/solace/auth.py/AuthSystemBase.edit_profile