'Return a list of image objects.
:keyword    location: Which data center to filter a images in.
:type       location: :class:`NodeLocation`
:return:  List of GCENodeImage objects
:rtype:   ``list`` of :class:`GCENodeImage`'

def list_images(self, location=None):

    try:
        if location:
            filtering = {'datacenter_id': int(location.id)}
        else:
            filtering = {}
        images = self.connection.request('hosting.image.list', filtering)
        return [self._to_image(i) for i in images.object]
    except Exception:
        e = sys.exc_info()[1]
        raise GandiException(1011, e)
