def list_pool(self, auth, spec=None):
if spec is None:<EOL><INDENT>spec = {}<EOL><DEDENT>self._logger.debug("<STR_LIT>" % unicode(spec))<EOL>sql = """<STR_LIT>"""<EOL>params = list()<EOL>where, params = self._expand_pool_spec(spec)<EOL>if len(where) > <NUM_LIT:0>:<EOL><INDENT>sql += "<STR_LIT>" + where<EOL><DEDENT>sql += "<STR_LIT>"<EOL>self._execute(sql, params)<EOL>res = list()<EOL>for row in self._curs_pg:<EOL><INDENT>p = dict(row)<EOL>if p['<STR_LIT>'] is None:<EOL><INDENT>p['<STR_LIT>'] = []<EOL><DEDENT>res.append(p)<EOL><DEDENT>return res<EOL>
Return a list of pools.

            * `auth` [BaseAuth]
                AAA options.
            * `spec` [pool_spec]
                Specifies what pool(s) to list. Of omitted, all will be listed.

            Returns a list of dicts.

            This is the documentation of the internal backend function. It's
            exposed over XML-RPC, please also see the XML-RPC documentation for
            :py:func:`nipap.xmlrpc.NipapXMLRPC.list_pool` for full
            understanding.