Describe addresses in ec2 api broken with neutron

It attempts to retrieve the fixed ip directly,
but it's not supported by neutron.

After the modification,
the instance uuid will be pulled without using get_fixed_ip().

Change-Id: Ia1b95d4c18aeb5012919af89148947694d80e2e7
Closes-Bug: #1273837
VMware: add missing translations

Commit 1c6898efecd7d78855efcb22d9c38d6127339000 added a number
of exceptions that did not have translation support.

Change-Id: I38715b8b14bdf9ccee08db44cf171f9c860b4fa8
Make test computations explicit

This test is full of magic numbers, making it very difficult to fix when
the underlying code changes. There are some obvious errors, such as an
instance having a different memory_mb value than its flavor. This patch
attempts to sort these issues out, making it easier to work on the
resource tracker with confidence.

Change-Id: I4549f0d9b10a5ac65f169199b98b8975ef2a8cd3
Fix display of server group members

The previous code was failing to display the members of server
groups because it was filtering them all out.

Interestingly, the previous code passes the unit tests due to a
bug where we treat regex comparisons differently when using mysql
vs sqlite (tracked under bug 1298690).

Change-Id: I7be9c180f4284dd18cd02e510e77e3c1e3fc9925
Closes-bug: 1298494
Added test cases in ConfKeyManagerTestCase to verify fixed_key.

ConfKeyManagerTestCase sets the fixed_key option, but does not
perform checks to verify it was used.  This patch adds the
appropriate unit test cases to verify the fixed_key option.

Change-Id: I686b095eeb86b67271dc0e3cb5b6acd5a24d3d03
Closes-Bug: #1226228
Localized error exception message on delete host aggregate

When a Host Aggregate was trying to be deleted and it already has
assigned hosts, the error message was not being translated.

Change-Id: I6255992a40030b0a232fc43e9b38071c0a471640
Partial-Bug: #1296430
Remove the unused _validate_device_name()

Since the commit I898ae56539c6101680983d1eca4bce6d92bd5ce6,
_validate_device_name() method has been unused.
This patch removes the method.

Change-Id: I642b71385432801eb8fdd35484fbcb3ed5efa795
Use debug level logging in unit tests, but don't save them.

We want to try formatting debug level logs so we can gate on any
formatting errors, but we don't want to save the debug level logs as
there are just too many of them. So use fixtures.FakeLogger running at
INFO level and a custom NUllHandler at DEBUG level.

Not Using fixtures level parameter since that sets the log level for the
entire logger and not just the individual handlers.

Don't inherit from logging.NullHandler since it isn't in python2.6

Change-Id: I7317092c0a2bad8efd11ece3ba521d58c2acae42
Allow user to specify image to use during rescue - V2 API changes

This commit includes the V2 changes.
Making changes in v2 API to take an extra parameter rescue_image_ref
as part of the rescue action API.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by
default.

Partially Implements: blueprint allow-image-to-be-specified-during-rescue

DocImpact

Change-Id: I985b21264841a6a18a66d19ccd41753f78576776
Add info_cache as expected attribute when evacuate instance

Nova evacuates instance failed with neutron. The reason is
when nova-conductor try to get network info for instance, it
need instance include 'info_cache', but the instance dict which
passed didn't include it. This patch adds 'info_cache' as the
expected attribute for get instance.

Change-Id: I6f110c607e32b0ab536916741605b25d572331dc
Closes-Bug: #1284709
Downgrade the log level when automatic confirm_resize fails

When CONF.resize_confirm_window is not 0, the unconfirmed migration
will be confirmed automatically after CONF.resize_confirm_window
seconds; it might fail due to reason such as instance is locked etc,
so failed to automatically confirm resize is not unexpected.
Downgrade the log from error to debug and after all, user can
either confirm it later or next automatically confirm might success.
Also modify the format of log as well.

Change-Id: I525c803d5e149c49606bcd460e2abb4c9300454a
Remove duplicate code from nova.db.sqlalchemy.utils

There is a lot of code in nova.db.sqlalchemy.utils which is also in
oslo-incubator's openstack.common.db.sqlalchemy.utils module so this
patch goes through and cleans up Nova.

Notable differences:

1. modify_indexes was nova-only but no longer used after the migration
   compaction work, so it's just removed here. It also didn't really
   work for mysql in cases where the index name was too long so it
   could be table-specific and therefore unusable in some mysql cases.
   See commit 029ebab for history.
2. create_shadow_table was not in oslo-incubator and it's also not
   currently used in nova after the migration compaction, however,
   I leave it here in case future migrations in Nova need to use it.
   This patch does replace the usage of _get_not_supported_column in
   create_shadow_table to use the same method from oslo's DB utils.
3. DeleteFromSelect is still used within nova.db.api per
   commit b36826e so we could move it to oslo-incubator but this
   patch leaves it for now since it's only used in Nova.
4. InsertFromSelect was introduced with commit 2e403b2 but now there
   is a copy in oslo-incubator so we can remove our usage in nova.
   However, oslo doesn't have the unit test that nova does, so the
   unit test has been moved to oslo with change I457acf33.
5. Oslo has is_backend_avail and get_connect_string methods so use
   those in test_migrations.py while doing this update.

Closes-Bug: #1280055

Change-Id: Iefa5b4311f1fe1a5da31cf527521c393f2face7c
Pass configured auth strategy to neutronclient

When the token is invalid Nova emits a log trace about an
unknown auth strategy (caused by neutron client). This is a
red herring and is only masking the fact that the token was
unable to be validated in the first place.

Partial-bug: 1297309

Change-Id: Ia3801f80c7ca18674fcf46b5270aa04f6c8c9331
Define constants for the VIF model types

Define constants for the common VIF model types. This will
ensure that all of the drivers will make use of the same values.

Change-Id: I2099bbe92906ac0b1b54f1819113b33565e78980
Remove nova-clear-rabbit-queues

It was already non-functional since
https://review.openstack.org/#/c/40355/

Change-Id: I56b19a49c123b73b6b3a5c4fc5f29864c6fd3b98
Closes-Bug: #1307460
ec2: remove db.instance_system_metadata usage

Update some direct db API calls getting and updating instance system
metadata with usage of the Instance object.  This is the last of
db.instance_* usage in the ec2 API.

Change-Id: I9270ddd2c6a91e85f1c0ed684cb0e440a1587cf2
ec2: get services using ServiceList object

Remove another direct use of the db API by making use of the
ServiceList object.

Change-Id: I9594033d798892df95404209d702f6af543a7139
ec2: use SecurityGroup object

Convert one place in the ec2 API code that was using the db API
directly to get a security group.  Use the SecurityGroup object for
this instead.

Some test fixes were needed to account for fields that the
SecurityGroup object does not have set as nullable.

Change-Id: I4b15b6bcb35f95955911a48faa8d74f6167593a0
ec2: use BlockDeviceMappingList object

Convert a direct use of the db API with the nova object equivalent.
Some test fixes were needed to include fields the object expects to be
preset in the fake db objects.

Change-Id: I1d562aa2535af9e713c6486c5c50a2ffe625c198
nit: correct docstring for FilterScheduler.schedule_run_instance

This patchset corrects the out of date docstring for
FilterScheduler.schedule_run_instance.

Change-Id: I353c8dfae4f7f214446f4b33df9583590711aaa5