Exemplo n.º 1
0
 def index(self, context):
     filtered = []
     image_metas = self.detail(context)
     for image_meta in image_metas:
         meta = utils.subset_dict(image_meta, ('id', 'name'))
         filtered.append(meta)
     return filtered
Exemplo n.º 2
0
 def index(self, context):
     filtered = []
     image_metas = self.detail(context)
     for image_meta in image_metas:
         meta = utils.subset_dict(image_meta, ('id', 'name'))
         filtered.append(meta)
     return filtered
Exemplo n.º 3
0
 def index(self, context):
     """Calls out to Glance for a list of images available."""
     # NOTE(sirp): We need to use `get_images_detailed` and not
     # `get_images` here because we need `is_public` and `properties`
     # included so we can filter by user
     filtered = []
     image_metas = self.client.get_images_detailed()
     for image_meta in image_metas:
         if self._is_image_available(context, image_meta):
             meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
             filtered.append(meta_subset)
     return filtered
Exemplo n.º 4
0
 def index(self, context):
     """Calls out to Glance for a list of images available."""
     # NOTE(sirp): We need to use `get_images_detailed` and not
     # `get_images` here because we need `is_public` and `properties`
     # included so we can filter by user
     filtered = []
     image_metas = self.client.get_images_detailed()
     for image_meta in image_metas:
         if self._is_image_available(context, image_meta):
             meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
             filtered.append(meta_subset)
     return filtered
Exemplo n.º 5
0
    def index(self, context, **kwargs):
        """Calls out to Glance for a list of images available."""
        params = self._extract_query_params(kwargs)
        image_metas = self._get_images(context, **params)

        images = []
        for image_meta in image_metas:
            # NOTE(sirp): We need to use `get_images_detailed` and not
            # `get_images` here because we need `is_public` and `properties`
            # included so we can filter by user
            if self._is_image_available(context, image_meta):
                meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
                images.append(meta_subset)
        return images
Exemplo n.º 6
0
    def index(self, context, **kwargs):
        """Calls out to Glance for a list of images available."""
        params = self._extract_query_params(kwargs)
        image_metas = self._get_images(context, **params)

        images = []
        for image_meta in image_metas:
            # NOTE(sirp): We need to use `get_images_detailed` and not
            # `get_images` here because we need `is_public` and `properties`
            # included so we can filter by user
            if self._is_image_available(context, image_meta):
                meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
                images.append(meta_subset)
        return images
Exemplo n.º 7
0
 def index(self, context, filters=None, marker=None, limit=None):
     """Calls out to Glance for a list of images available."""
     # NOTE(sirp): We need to use `get_images_detailed` and not
     # `get_images` here because we need `is_public` and `properties`
     # included so we can filter by user
     filtered = []
     filters = filters or {}
     if 'is_public' not in filters:
         # NOTE(vish): don't filter out private images
         filters['is_public'] = 'none'
     image_metas = self.client.get_images_detailed(filters=filters,
                                                   marker=marker,
                                                   limit=limit)
     for image_meta in image_metas:
         if self._is_image_available(context, image_meta):
             meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
             filtered.append(meta_subset)
     return filtered
Exemplo n.º 8
0
 def index(self, context, filters=None, marker=None, limit=None):
     """Calls out to Glance for a list of images available."""
     # NOTE(sirp): We need to use `get_images_detailed` and not
     # `get_images` here because we need `is_public` and `properties`
     # included so we can filter by user
     filtered = []
     filters = filters or {}
     if 'is_public' not in filters:
         # NOTE(vish): don't filter out private images
         filters['is_public'] = 'none'
     image_metas = self.client.get_images_detailed(filters=filters,
                                                   marker=marker,
                                                   limit=limit)
     for image_meta in image_metas:
         if self._is_image_available(context, image_meta):
             meta_subset = utils.subset_dict(image_meta, ('id', 'name'))
             filtered.append(meta_subset)
     return filtered