@requires_rw
    def add_pool(self, auth, attr):

        self._logger.debug("add_pool called; attrs: %s" % str(attr))

        # sanity check - do we have all attributes?
        req_attr = ['name', 'description', 'default_type']
        self._check_pool_attr(attr, req_attr)

        insert, params = self._sql_expand_insert(attr)
        sql = "INSERT INTO ip_net_pool " + insert

        self._execute(sql, params)
        pool_id = self._lastrowid()
        pool = self.list_pool(auth, { 'id': pool_id })[0]

        # write to audit table
        audit_params = {
            'pool_id': pool['id'],
            'pool_name': pool['name'],
            'username': auth.username,
            'authenticated_as': auth.authenticated_as,
            'full_name': auth.full_name,
            'authoritative_source': auth.authoritative_source,
            'description': 'Added pool %s with attr: %s' % (pool['name'], str(attr))
        }
        sql, params = self._sql_expand_insert(audit_params)
        self._execute('INSERT INTO ip_net_log %s' % sql, params)

        return pool
Handle GET request.
dataset/ETHPy150Open SpriteLink/NIPAP/nipap/nipap/backend.py/Nipap.add_pool--crossover with--dataset/ETHPy150Open ExCiteS/geokey/geokey/contributions/views/observations.py/ProjectObservations.get