def retrieve_list(self, parsed_args):
neutron_client = self.get_client()<EOL>_extra_values = parse_args_to_dict(self.values_specs)<EOL>_merge_args(self, parsed_args, _extra_values,<EOL>self.values_specs)<EOL>search_opts = self.args2search_opts(parsed_args)<EOL>search_opts.update(_extra_values)<EOL>if self.pagination_support:<EOL><INDENT>page_size = parsed_args.page_size<EOL>if page_size:<EOL><INDENT>search_opts.update({'<STR_LIT>': page_size})<EOL><DEDENT><DEDENT>if self.sorting_support:<EOL><INDENT>keys = parsed_args.sort_key<EOL>if keys:<EOL><INDENT>search_opts.update({'<STR_LIT>': keys})<EOL><DEDENT>dirs = parsed_args.sort_dir<EOL>len_diff = len(keys) - len(dirs)<EOL>if len_diff > <NUM_LIT:0>:<EOL><INDENT>dirs += ['<STR_LIT>'] * len_diff<EOL><DEDENT>elif len_diff < <NUM_LIT:0>:<EOL><INDENT>dirs = dirs[:len(keys)]<EOL><DEDENT>if dirs:<EOL><INDENT>search_opts.update({'<STR_LIT>': dirs})<EOL><DEDENT><DEDENT>data = self.call_server(neutron_client, search_opts, parsed_args)<EOL>collection = _get_resource_plural(self.resource, neutron_client)<EOL>return data.get(collection, [])<EOL>
Retrieve a list of resources from Neutron server.