

def describe(self, context, ids=None, names=None, filter=None, max_results=None, next_token=None):
    if (max_results and (max_results < 5)):
        msg = (_('Value ( %s ) for parameter maxResults is invalid. Expecting a value greater than 5.') % max_results)
        raise exception.InvalidParameterValue(msg)
    self.context = context
    self.selective_describe = ((ids is not None) or (names is not None))
    self.ids = set((ids or []))
    self.names = set((names or []))
    self.items = self.get_db_items()
    self.os_items = self.get_os_items()
    formatted_items = []
    self.items_dict = {i['os_id']: i for i in (self.items or [])}
    paired_items_ids = set()
    for os_item in self.os_items:
        os_item_name = self.get_name(os_item)
        os_item_id = self.get_id(os_item)
        item = self.items_dict.get(os_item_id, None)
        if item:
            paired_items_ids.add(item['id'])
        if (self.selective_describe and (not ((os_item_name in self.names) or (item and (item['id'] in self.ids))))):
            continue
        item = self.auto_update_db(item, os_item)
        if item:
            paired_items_ids.add(item['id'])
        formatted_item = self.format(item, os_item)
        self.post_format(formatted_item, item)
        if (os_item_name in self.names):
            self.names.remove(os_item_name)
        if (item and (item['id'] in self.ids)):
            self.ids.remove(item['id'])
        if (formatted_item and (not self.filtered_out(formatted_item, filter))):
            formatted_items.append(formatted_item)
    for item in self.items:
        if (item['id'] in paired_items_ids):
            continue
        formatted_item = self.handle_unpaired_item(item)
        if formatted_item:
            if (not self.filtered_out(formatted_item, params)):
                formatted_items.append(formatted_item)
            if (item['id'] in self.ids):
                self.ids.remove(item['id'])
    if (self.ids or self.names):
        params = {
            'id': next(iter((self.ids or self.names))),
        }
        raise ec2utils.NOT_FOUND_EXCEPTION_MAP[self.KIND](**params)
    return self.get_paged(formatted_items, max_results, next_token)

dataset/ETHPy150Open openstack/ec2-api/ec2api/api/common.py UniversalDescriber.describe/VarMisuse@444/621 `filter`->`params`