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
Ignore InstanceNotFound while getting console output

During we cold-migrating or resizing an instance to another host,
or during deleting it, the get_console_output method may raise an
InstanceNotFound excetpion if the instance is not on the hypervisor,
this is an expected error, so we should add it to expected
exceptions list in compute manager.

Closes-bug: #1292339
Change-Id: I23a99438d73826f01ff5662130dcbfa72dc39a6e
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
XenAPI: Calculate disk_available_least

The disk_available_least item is now needed for the tempest test.
Calculate based on the virtual-allocation from the SR.

Change-Id: I1a08f229de7cd77d4798472c82304247fae290e5
Closes-bug: 1300242
Rename instance_actions v3 to server_actions

* Renames the os-instance_actions v3 plugin to os-server-actions
* Also modifies api specific tests and expected user input JSON
* DocImpact only for v3 Nova api documentation for this plugin.

Closes-Bug: #1206032

DocImpact

Change-Id: Id5049e10f5ef540d0d8e3871d800e9d9cb33da73
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
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
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
GET details REST API next link missing 'details'

When executing a pagination query a "next" link is included in the
API reply when there are more items then the specified limit.

See pagination documentation for more information:
http://docs.openstack.org/api/openstack-compute/2/content/
Paginated_Collections-d1e664.html

The caller should be able to invoke the "next" link (without
having to re-format it) in order to get the next page of data.
The documentation states "Subsequent links will honor the
initial page size. Thus, a client may follow links to traverse
a paginated collection without having to input the marker parameter."

The problem is that the "next" link is always scoped to the
non-detailed query.

For example, if you execute "/v2/<tenant>/servers/detail?limit=1",
the "next" link does not have the URL for a detailed query and is
formatted as "/v2/<tenant>/servers?limit=1&marker=<marker>". In this
case the "next" link needs to be scoped to "/v2/<tenant>/servers/detail".
Common code is used for both the v2 and v3 APIs.

Existing test cases will be updated to verify that the next link is
correctly scoped for both the v2 and v3 APIs.

The user could work around this issue my manually inserting '/details'
into the "next" link URL.

Change-Id: Ib06a6cc6e2dd5e2c8c16986ee256a58752626eb9
Closes-bug: 1299247
remove unneeded call to network_api on rebuild_instance

When rebuilding an instance we call the network_api and which results in
calling neutron and updating the info cache. We do not actually need to
do this as we can get the nw_info directly from the instance's info cache.

Change-Id: I2bcc2f15b1e5bb52d972098c7bc3e12f160b6feb
Closes-bug: 1294914
Fix the explanations of HTTPNotFound for keypair's API

Gets the "explanation" from HTTPNotFound exception and returns
correct message. the commit Ia784e09cda986a421e83c2820dfd0a2267867cdd
has fixed this kind of bug already, but this bug is remained.

Closes-Bug: #1307338
Change-Id: I6811eecba86938e4253f437b7677cb7e4468fd67
VMware: Log additional details of suds faults

When a suds requests results in a fault response, the current
code loses details on that fault in the sequence of exceptions
propagated through the driver.  A NoPermission fault will contain
additional metadata on the privilegeId and object type which
needs to be logged.  The fault string will be propagated with this
fix, along with details of a NoPermission fault.

An example of the new exception:
NoPermissionException: Permission to perform this operation was denied.
{u'privilegeId': Resource.AssignVMToPool, u'object': domain-c7}

An example of new exception within retrieveproperties_fault_checker:
Error(s) NoPermission occurred in the call to RetrievePropertiesEx
{'privilegeId': System.Read, 'object': datacenter-16}

Change-Id: Iafbf052750c2835f304b2edf21d7300d1fbd7e5a
Closes-bug: #1289627