@resources.command(ignore_defaults=True, no_args_is_help=False)<EOL><INDENT>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', is_flag=True, default=False, show_default=True,<EOL>help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', default=<NUM_LIT:1>, type=int, show_default=True,<EOL>help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', type=int, show_default=True, required=False,<EOL>help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', required=False, nargs=<NUM_LIT:2>, multiple=True,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL>def list(self, all_pages=False, **kwargs):<DEDENT>
<EOL>if kwargs.get('<STR_LIT:status>', None) and '<STR_LIT:U+002C>' in kwargs['<STR_LIT:status>']:<EOL><INDENT>all_status = kwargs.pop('<STR_LIT:status>').strip('<STR_LIT:U+002C>').split('<STR_LIT:U+002C>')<EOL>queries = list(kwargs.pop('<STR_LIT>', ()))<EOL>for status in all_status:<EOL><INDENT>if status in STATUS_CHOICES:<EOL><INDENT>queries.append(('<STR_LIT>', status))<EOL><DEDENT>else:<EOL><INDENT>raise exc.TowerCLIError('<STR_LIT>'.format(status))<EOL><DEDENT><DEDENT>kwargs['<STR_LIT>'] = tuple(queries)<EOL><DEDENT>if all_pages:<EOL><INDENT>kwargs.pop('<STR_LIT>', None)<EOL>kwargs.pop('<STR_LIT>', None)<EOL><DEDENT>debug.log('<STR_LIT>', header='<STR_LIT>')<EOL>response = self.read(**kwargs)<EOL>self._convert_pagenum(response)<EOL>if all_pages and response['<STR_LIT>']:<EOL><INDENT>cursor = copy(response)<EOL>while cursor['<STR_LIT>']:<EOL><INDENT>cursor = self.read(**dict(kwargs, page=cursor['<STR_LIT>']))<EOL>self._convert_pagenum(cursor)<EOL>response['<STR_LIT>'] += cursor['<STR_LIT>']<EOL>response['<STR_LIT:count>'] += cursor['<STR_LIT:count>']<EOL><DEDENT>response['<STR_LIT>'] = None<EOL><DEDENT>return response<EOL>
Return a list of objects.

        If one or more filters are provided through keyword arguments, filter the results accordingly.

        If no filters are provided, return all results.

        =====API DOCS=====
        Retrieve a list of objects.

        :param all_pages: Flag that if set, collect all pages of content from the API when returning results.
        :type all_pages: bool
        :param page: The page to show. Ignored if all_pages is set.
        :type page: int
        :param query: Contains 2-tuples used as query parameters to filter resulting resource objects.
        :type query: list
        :param `**kwargs`: Keyword arguments list of available fields used for searching resource objects.
        :returns: A JSON object containing details of all resource objects returned by Tower backend.
        :rtype: dict

        =====API DOCS=====