We have code in compute/api that still passes non-object instance dicts
over RPC to compute manager's refresh_instance_security_rules(). For now,
we can just decorate this with object_compat.
Change-Id: I0474aa8b14c897f66095ec11ca0329309bd37b5d
Closes-Bug: #1435586
In Ia5367cf064d40690670ffeac3c1f16998464c234, we added a capability
to preserve preexisting ports on server delete. There was one scenario
that broken as a result as reported in the bug.
"If I boot instance with preexisting port and attach one more port
then first port is deleted while I delete the instance."
Essentially we have to lookup get_preexisting_port_ids during
boot as well as when we are attaching an interface.
Closes-Bug: #1433524
Change-Id: I3d557dd95f442106c495249a5ef1d2ac36e6a2ea
0.3.0 of cirros is a bit old. Let's switch to
what we test in our CI jobs which currently is 0.3.2
Change-Id: I999063dc0a86335b94376409ddd559e880c54bcc
Wikipedia's list of common misspellings [1] has a machine-readable
version. This patch fixes those misspellings mentioned in the list
which don't have multiple right variants (as e.g. "accension", which can
be both "accession" and "ascension"), such misspellings are left
untouched. The list of changes was manually re-checked for false
positives.
[1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
Change-Id: I52a6f641a203185f9005bc0731d15166ad741161
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Currently v2 and v2.1 have separate functional tests and their
corresponding sample files. As v2 and v2.1 are supposed to be identical,
there is overhead to maintain two set of functional tests and sample files.
We can have one set of tests which can run for both v2 and v2.1.
This commit use the testscenearios to generate the tests one for v2 and one for v2.1
and make v2.1 tests to run against v2.1 plugins by redirecting /v2 endpoint to v2.1
plugins in api-paste.ini
As example this commit merge flavor APIs functional tests between v2 & v2.1.
In V2 flavor API has following extensions
- Flavor_swap
- Flavor_disabled
- Flavorextradata
In V2.1 above extensions have been merged together in flavor plugins
NOTE- As testscenarios is applied in base class. v2 tests will be generated
for all the existing tests but for tests which are not merged yet
their v2 generated tests will be skipped till they gets
merged. After merge, both version tests are expected to pass like
flavor tests in this patch. So you may see lot of skipped tests
which is expected and will gets disappear as tests gets merged.
Change-Id: I0e0262f818c7d7fb15528b16d3225b9578910996
In very base test class (TestCase), addCleanup method (_clear_attrs())
is being added to explicitly delete the attributes of tests objects
to free up the memory. Details- I0e660b6c2a77c5613c5a523ba0a64c3d7f6dd128
v2 and v2.1 API has separate set of functional tests which is not good
as both API supposed to be same and can be tested by single set of tests.
Plan is to run one set of tests for both the v2 and v2.1 using testscenarios.
In that case, deleting attributes in existing way will cause issue.
If tests are being generated using testscenarios then, 'id' attribute is being
added during cloning the tests. And later that 'id' attribute is being used by
test suite to generate the results for each newly generated tests by testscenarios.
(Issue can be seen in I0e0262f818c7d7fb15528b16d3225b9578910996 PS10).
To make testscenarios work in functional tests, this commit skip the 'id' attribute
to be explicitly deleted in cleanup method.
Change-Id: I151d955545ec716f288c3ac465af7748851d79ed
In Havana, commit 3cf4cb253 moved the volume usage notify code to
conductor.
In Juno, commit 47f6ffad8 dropped vol_get_usage_by_time from conductor
manager but not from the conductor api/rpcapi modules. Without
vol_get_usage_by_time being in conductor manager it's an API pointing to
nothing and won't work so we should remove it.
The DB APIs are left in since the vol_usage_update DB API is tested
using vol_get_usage_by_time.
If we were to leave the conductor APIs in tree, we should add the
conductor manager method back in and convert the volume_usages table to
nova objects, and possibly also expose it via a v2.1 API extension.
Closes-Bug: #1434687
Change-Id: Ie2980d681c62cd3457b359fbe4f5c32a2bcfc5db
The default tox cmd should also run the 'functional' target, this got
missed in adding that sub target.
Change-Id: I9a10b0c9798d9f90db03991c45b9f2b285d1e4d0
Make use of an existing instance object. This one can be used
instead of creating a new on.
TrivialFix
Change-Id: Ie697de2af5dfa66df41a9534f3da8fd62222ad47
Since the API enforces that name is not null, the database schema and
model are now updated to enforce this.
Change-Id: I1088cc79f4998d3b6609891adbb0479381297ec4
Related-Bug: #1403544
Closes-Bug: #1189981
In certain cases compute does not clean up neutron ports after
unsuccessful vm spawn.
commit 5120c4f7c2 assumes that
deallocation is already handled in this code path
however it's not always the case (see bug report for details)
This patch adds the check for network_info is empty at the moment
failure occures. If it's empty it's better to cleanup network
to eliminate the chance of orphaned ports in neutron.
Closes-Bug: #1423845
Change-Id: I88f535193dbd35253a4444950f6b2812e1a2a407