As part of commit 5668870, we now explicitly guard against the case
free_disk_gb is None or unset. However, this should never happen
since resource tracker always sets it and guarding against this case
isn't actually needed to fix the bug in question.
Also, simplify the code a little to make the intent more clear. We
assume that free_disk_gb is always set, but we want to use
disk_available_least where the driver has set it. The case where
disk_available_least is less than free_disk_gb is the exceptional
case we want to guard against.
Change-Id: I3973eab6b4ca016df546de8b57245fc0d0f03a80
oslosphinx is now available as a replacement for oslo.sphinx that
won't conflict with oslo.config in virtual envs.
Change-Id: I7c116f816af895261e76af385ee3e9288e6fa70f
Closes-Bug: #1277168
Some of tests use different method of assertTrue(isinstance(A, B)) or
assertEqual(type(A), B). The correct way is to use assertIsInstance(A,
B) provided by testtools.
Change-Id: I4a5413f9d90d2e581044885a440a46bf3d76598f
Closes-Bug: #1268480
This makes nova-network manager use the FixedIP object for
updates instead of direct database calls.
Related to blueprint nova-network-objects
Change-Id: Ia191148cf7510ffdb0fbd4186fa34bb4c5ab1b0f
This makes nova-network mananger use the FixedIP object for
disassociating IPs.
Related to blueprint nova-network-objects
Change-Id: Ia0a38bbd31cc22095893bff89bcaa402a9bc2722
Moves the migrate/live-migrate server functionality out of admin_actions into
its own extension. This part of the blueprint v3-admin-actions-split
allows more selective enablement of features contained in the admin
actions extension.
Note the XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.
Refactor removes some exception handling for migrate along with the relevant tests
as those exceptions will never occur.
Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-migrate-server extension and moves migrate/live-migrate
functionality out of os-admin-actions into this new extension.
Change-Id: I6b29f501ad6bb9a6401b1c20cd419d9e05fe369b
This patch moves "compute:start/stop" to api layer for ec2 and nova
v2 api, and uses "compute:v3:servers:start/stop" for nova api v3.
Also removes policy check from compute api. And give default rules
for v3 policy check.
Add core_authorizer with 'compute:' as the scope of core api in v3.
That's for distinguishing core and extension api. Use different namespace
for policy. The policy of core api will be 'compute:v3:extension_name'.
Partially implements bp v3-api-policy
DocImpact
Change-Id: I6c4f1c677b64015c61440f9db941d1ab9cf77b48
Refactor compute node methods to remove slow join with compute node
stats. Stats are encoded instead in a single json/text column.
Implements: blueprint compute-node-stats-as-resource-tracker-extension
Change-Id: I1651d758dd21c87ccd768fdd86c910ec5080c71c
We have git to track authorship, so let's not pad source files
with it as well.
Co-authored-by: Joe Gordon <joe.gordon0@gmail.com>
Change-Id: Ic2d62d6743f7716c086749cd99922b6c496771d4
Removes the character filtering from the V3 API console_output
extension as this was implemented because of a bug in the xml
library where some characters were not escaped correctly. We no
longer need to do this as we no longer support XML.
Partially implements bp remove-v3-xml-api
Change-Id: Id1501143eca17084d4079777a3c6f8c7157fbac7
This test currently does:
try:
self.api.update_aggregate(...)
except exception.InvalidAggregateAction as e:
msg = "host1 in avail_zone1,host2 in avail_zone1"
self.assertTrue(e.format_message().find(msg))
There are two issues with this: 1) if update_aggregate() doesn't raise
an exception, the test will pass and 2) if exception doesn't contain
the message (which it doesn't, it's not the correct message) then
find() will return -1 and the assertion passes.
Fix both of these simply by using assertRaises()
Change-Id: I31edef2cfdd9ce748f19b09e93ae00a7437a52f5