Share unittest between v2 and v2.1 for hide_server_addresses extension

This patch make the v2.1 hide_server_addresses extension running on v2
unittest, also delete the v3 unittest.

Partially implements blueprint v2-on-v3-api

Change-Id: I9b8e8d10ba59b344d5bdf285fffffd98ed02ebc0
Imported Translations from Transifex

Change-Id: I2749dc18aac367faf827caf8f1f2699fbf8ce954
Fixes Hyper-V vm state issue

The method which gets VM related information can fail if the
vm is in an intermediary state such as "Shutting down".
The reason is that some of the Hyper-V specific vm states
are not defined as possible states.

This patch assures that a valid state is always returned by
this method.

Change-Id: I64e95f6b537e83a30dd64474f63f140e0e8e7373
Closes-Bug: #1352428
Fixes Hyper-V boot from volume root device issue

Checks that instances are booting from volume by checking
the correct root device obtained from the block device info.

Change-Id: I94941dfe96c1596c8e9b91df3d3d19d33ae7fe92
Co-Authored-By: Zsolt Dudas <zdudas@cloudbasesolutions.com>
Closes-Bug: #1357972
libvirt: reduce indentation in is_vif_model_valid_for_virt

For some reason the is_vif_model_valid_for_virt method is using
8 space indentation instead of the normal 4 spaces.

Change-Id: Ibbc86af5fbea3a115d344907a1d95fb184b61ebc
Update migration defaults

In TripleO we wanted to enable live block migration. Pleasantly
surprising was finding that all it required was better options to
libvirt.

I'm told this works with the libvirt we gate on, though as we don't
gate migration yet, its hard to tell.

Change-Id: I7b997666474ec324c5034e3660a7271b8423bca8
DocImpact:
UpgradeImpact:
Objectify last uses of direct db access in network/floating_ips

These were previously skipped since they're not used when all services are
on master. However, they're trivial to convert and help clean up our
reports of "what's left". Since we technically need to keep them in the
tree until we bump the network RPC version, this converts them and adds
tests.

Related to blueprint compute-manager-objects-juno

Change-Id: I17296a807524a76caa10e41ea2b05c7514169fa2
Merge "Fixes Hyper-V vm state issue"
Objectify association in neutronapi

This makes the neutronapi use the Instance object for the associate
path and updates the test to match.

Related to blueprint compute-manager-objects-juno

Change-Id: I045bfbd16e3b45107bd11e3874ce47280574930a
Move fake_quotas and fake_get_quotas into a class

fake_quotas and fake_get_quotas are used in ExtendedQuotasTest only,
and this patch moves them into the class for cleanup.
In addition, this patch moves the mox settings into setUp() method
for the same purpose.

Change-Id: I9920d6207bb27537e6d4e738d69d59f7ed255240
Add test for get_instance_disk_info to test_virt_drivers

Commit 2bed16c89356554a193a111d268a9587709ed2f7 added
get_instance_disk_info to the base ComputeDriver class
but didn't add a test for it in test_virt_drivers, so
it's added here.

This also fixes the wrong method signature in the fake
virt driver.

Note that this wouldn't have found the problem for the
hyperv or vmware drivers due to bug 1209421.

Change-Id: I5765720d8c3e0a7962b493fa49359514f3136544
Related-Bug: #1358719
Merge "Check compulsory flavor create parameters exist"
Merge "Standardize logging for v3 api extensions"
Merge "Objectify last uses of direct db access in network/floating_ips"
Add missing create() method on SecurityGroupRule object

The nova.objects.SecurityGroupRule class was missing the
create() method, so we add it here, and while doing so,
ensure that the id attribute is marked as read-only.

Partial-Blueprint: compute-manager-objects-juno
Change-Id: I4584e33d9d163a7dce01b01d205f2f43824e544f
Merge "Imported Translations from Transifex"
Merge "Make API name validation failure deterministic"
Merge "libvirt: reduce indentation in is_vif_model_valid_for_virt"
Libvirt: Do not raise ENOENT exception

If the disk disappears during update_status(), only need to print
a warning, and do not need to raise an exception.

Change-Id: I87800c855c7b349f69163e33031404ad25e2a9ca
Closes-Bug: 1358609
Add some v2 agents API tests

On most APIs, the unit test coverage of v3 is better than the one of v2.
This patch ports v3 agents API tests to v2 tests for improving v2 agent
API tests.

Change-Id: I045c8fa64eb4cd2bf5852d4656d1067ec12a8564