def list_pool(self):
<EOL>attr = XhrController.extract_pool_attr(request.json)<EOL>try:<EOL><INDENT>pools = Pool.list(attr)<EOL><DEDENT>except NipapError as e:<EOL><INDENT>return json.dumps({'<STR_LIT:error>': <NUM_LIT:1>, '<STR_LIT:message>': e.args, '<STR_LIT:type>': type(e).__name__})<EOL><DEDENT>return json.dumps(pools, cls=NipapJSONEncoder)<EOL>
List pools and return JSON encoded result.