Replace mox testing library by mock one in the file
glance/tests/unit/api/test_cmd.py
Change-Id: I2dde0ca59c4a80bd35c6c6b74c4d3231a97eaf74
partially-implements: blueprint replace-mox-with-mock
Fix the typo in the help text for the hasing_algorithm configuration
option introduced in Rocky for the multihash implementation.
Change-Id: I709631666895b4de49290178eaa5968ea0ae2e2f
Added documentation and modified api-ref documents to
reflect multiple stores support changes.
Related to blueprint multi-store
Change-Id: I932297df8149968d31a5367a9ca71a5629045445
Added some unit tests for coverage purpose.
Added functional tests for create and import scenarios.
Note:
For functional tests I have considered file store with two
different image directories.
Related to blueprint multi-store
Change-Id: I59e28ab822fb5f6940f48ddbf6dfba4cb7d4c509
Made provision for multi-store support. Added new config option
'enabled_backends' which will be a comma separated Key:Value pair
of store identifier and store type.
DocImpact
Depends-On: https://review.openstack.org/573648
Implements: blueprint multi-store
Change-Id: I9cfa066bdce51619a78ce86a8b1f1f8d05e5bfb6
Added new boolean column "os_hidden" in images table. Images where
"os_hidden" = True will be omitted from the image list presented
to the user. This will apply to all image visibilities. However,
the images will continue to be discoverable. User can use
filter "os_hidden=true" in GET v2/images call to see all hidden
images.
Implements: blueprint hidden-images
Change-Id: If8f02ca94fdb8e1ac7a81853cd392988900172d1
There were some recent changes to oslo.policy that include specific
type checks of the ``creds`` parameter passed to the ``enforce()``
method:
https://review.openstack.org/#/c/578995/
The above change allows consuming projects to pass instances
of oslo_context.context.RequestContext to the policy enforcer, as
opposed to building a dictionary instance from scratch multiple
different ways across projects.
The glance unit tests were failing with the new version of
oslo.policy (1.38.0) because they were passing in a Mock instance
which failed the new, more strict, type check.
This commit converts the setUp class of the tests to use an instance
of glance.context.RequestContext, which subclasses RequestContext
from oslo.context. It also sets the user_id and project_id attributes
of the context object to override authorization checks.
This should allow glance to pass with newer versions of oslo.policy.
Change-Id: I0a69bc9565d57fd6ad8484abc5fce0e8dd45f9f2
Closes-Bug: 1781976
Required traits on the image allow specifying a server to be
built only on compute nodes which express those traits. The
Nova Scheduler has been updated to look at the image trait
properties when selecting compute nodes.
Updating the documentation for glance to explain the same.
Documentation is similar to flavor required traits documentation available
here: https://docs.openstack.org/nova/latest/user/flavors.html#extra-specs
Change-Id: I716821abf44238eecc9c4a1d198d8a31b87dedce
Implements: blueprint glance-image-traits
This change removes option to configure Images API v1
This change removes Images API v1 endpoints from the router
This change removes all v1 tests
This change removes the v1 dependant glance-cache-manage command
This change does not remove all v1 codebase. Further cleanup and
decoupling will be needed.
Change-Id: Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ic9645685e0f9ae25b0b2b754b11e34d8aef41829
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The cmp() built-in is no longer available under python 3 and the
__cmp__ method is not used. Remove __cmp__ and __ne__ and add a __lt__
method and use the functools.total_ordering decorator to provide all
of the rich comparison methods for StoreLocations.
Change-Id: Iae1d0c27bd82a42c80fc98f87c9b85edef527c51
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Updates the Glance Administration Guide and adds a release note.
Depends-on: https://review.openstack.org/#/c/579507/
Change-Id: I87343b67614da8dea3a09b10456f4bfc0042ed0e
The `glance manage purge-images-table` is supposed to be used
only if really required due to OSSN-0075. And the advice is
not to purge any freshly deleted rows due to the possible
ID collision of still in use images. This change increases
the default of "age_in_days" to 180 from it's original 30 to
stress this out. User can still define smaller age if they
must.
Change-Id: Idb13288b72b31940a357fc9b11db2d6bcd396261
Modified the current ``glance-manage db purge`` command to eliminate images
table from purging the records. Added new command
``glance-manage db purge_images_table`` to purge the records from images
table.
DocImpact
SecurityImpact
Change-Id: Ie6641659b54543ed9f96c393d664e52a26bfaf6a
Implements: blueprint mitigate-ossn-0075
This change prevents taskflow creation during image import in cases
we know for sure that the image activation won't be successful.
The change follows the Glance principles of failing early and tries
to provide as meaningful error messages to the end user as possible.
Co-authored-by: Abhishek Kekane <akekane@redhat.com>
Closes-bug: 1758943
Change-Id: Iaee2781d07f4c0afd4f886f0b30b523bd47f1058
Nova's libvirt driver has changed[*] the default source from /dev/random
to /dev/urandom:
"Since libvirt 1.3.4, any RNG (Random Number Generator) device path
(that returns random numbers when read!) is accepted. However, the
recommended source of entropy is `/dev/urandom` (it is non-blocking;
and doesn't have the same limitations of `dev/random`, which is a
legacy interface)."
Update the relevant Glance documentation to reflect that.
[*] https://git.openstack.org/cgit/openstack/nova/commit/?id=814bfd93
Change-Id: I656b5c244b98202f3c8d019d0bbeddc4e7c0314a
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>