Currently we allow tenant access for public flavor, however,
we can't query it after that because flavor is public.
This patch adds check for add access function to raise exception
if the flavor is public.
Also, a nit change is use methods introduced in
793bcc07b9 to get flavor.
APIImpact: Adds new 2.7 API microversion due to new error condition
in flavor access API
Implements blueprint check-flavor-type-before-add-tenant
Closes-Bug: #1361476
Change-Id: I461175e9969a0dd5b2b7ef75ea7d9f36f3a306d0
shelved_offload_time -1 means never offload shelved instance. Currently,
the periodic task "_poll_shelved_instances" changes the vm state from
SHELVED to SHELVED_OFFLOAD even when the shelved_offload_time is set to -1.
Added check in _poll_shelved_instances to offload instances only if
shelved_offload_time is greater than 0.
DocImpact
Closes-bug: #1472946
Change-Id: I55368e961b65a5ca73718fdcd42823680f7cbfa4
The Guru Meditation Reports has graduated from oslo-incubator, Nova
should switch to use oslo.reports to keep the code base clean.
Change-Id: Ifc35c9e5455eb965e4520438284cf7baa0a00d43
Blueprint: graduate-oslo-reports
I ended poking around a bit after mock 1.1.4.
The current skip is fixable by using a stateful side effect - the only
reason the test ever worked before is that mock 1.0.1 returned the
same data from every read call, which was explicitly fixed in Python
3.4.
However one of the other 'fixes' was buggy: it works by making the
strings match up but the code under test can be broken by not doing
the second open/read and it will still pass : thus the test is invalid
and should be skipped to avoid incorrect coverage stats.
Change-Id: Idec1b6b24e6d9d4a7567ae1f7753bffb9cb8bd5b
Closes-Bug: #1473401
These were inconsistent, occassionally had the wrong translation
marker, and sometimes were substituting variables incorrectly.
No functional changes, just a cleanup.
Change-Id: I05578f497fc863ad453bba277072b8e4893006bf
This reverts commit def785a23d.
As discussed at the nova liberty mid-cycle, we still have concerns about
how this was implemented. We've also talked through an alternative
implementation (generate the config drive to a directory and then just map
that directory into the container).
I will work on the changes needed on the config drive site to implement
that now, and will help the PCS guys integrate that with their code.
Change-Id: I7106e9bf367e0d392566cf5271ae52fc1595284e
Updated the debug messages following comments on the review
https://review.openstack.org/#/c/198312
TrivialFix
Change-Id: Ia660844430abff1d065c60ea58423ffca1889f51
The the hardware methods a flavor object is passed to the methods
so we should use the dot notation.
TrivailFix
Change-Id: I32f7ac6ba6ffa278ed6abf01ef9611199c41f85e
Any new property which wants to use a list of versions can
use VersionPredicate to say which ranges are good.
NOTE: The new type of field is also proposed for o.vo
here: https://review.openstack.org/204113
Partially-Implements: blueprint request-spec-object
Change-Id: I8b371ec46f8844fce380988e8fdd52146197503b
Since no in-tree filters are using directly the related dict keys in
filter_properties but as they are also provided in the instance_properties
for any out-of-tree filter which would use them, we can just remove them
from filter_properties.
Partially-Implements: blueprint request-spec-object
Change-Id: Ie89f3084a2a26857e1317ffd64e495cc94718676
On the MySQL backend, change the collation type on flavor extra-specs
to be utf8_bin, i.e., case-sensitive.
Other backends (e.g., SQLite) are case-sensitive, and the code
around extra-spec duplicate detection assumes this is universally
true. This author is of the opinion that treating what is essentially
user-input as case-sensitive is a good idea, so assume the code is
correct, and fix the database.
TrivialFix
Change-Id: I64f1cc1b5c604085f879a25cbbd47c04b05e096d
Closes-Bug: 1463948
Instead of re-instancing + mocking a new guest object
each time manually this commit introduces an attribute
guest which will be resetted and well configured
every tests executed .
Change-Id: Iaba9db2b6110375d02dfd07665003279ec2a3d41
The instance tests were written back when the only non-db model of an instance
we had was in the api fakes module. That module is problematic in several ways,
but also needs to change to be non-db-focused soon. This patch converts
the instance object tests to use fake_db_instance to break it away from the api
fakes module.
Related to bp/drop-flavor-compat
Change-Id: Ib790dce76394ce64e9a0faed0f51cce08d256cd5