Comment 12 for bug 1291014

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/79780
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8babd6a99014ccaf51d955769eaec085e037cc76
Submitter: Jenkins
Branch: master

commit 8babd6a99014ccaf51d955769eaec085e037cc76
Author: Jay Pipes <email address hidden>
Date: Tue Mar 11 17:29:37 2014 -0400

    Ensure is_image_available handles V2 Glance API

    The V2 Glance API uses warlock to validate returned models
    from calls such as GET /images/{id}. The get_locations() call in
    the Nova Glance image driver was using the V2 Glance API call
    to GET /images/{id} (which is correct, since image locations only
    exist in the V2 API), but the GlanceImageService._is_image_available()
    method was checking the is_public attribute of the supplied image model.

    This caused warlock to throw an exception since is_public is not
    an attribute on the V2 API's returned image model in glanceclient.
    This change adds some checks that can handle both the V2 and V1 returned
    image models from glanceclient and a bunch of unit tests to thoroughly
    exercise the is_image_available method.

    Change-Id: I35b5af8331c5972bd89e1a674091fa2e3bde28a7
    Closes-bug: #1291014