Support building wheels (PEP-427)

Universal is used to identify pure-Python module(by bdist_wheel). For
these, it is sufficient to build a wheel with _any_ Python ABI version
and publish that to PyPI (by whatever means).

Change-Id: Ic22b78ef6434ebf888c92c0a162caeabb70edf88
Make sure "volumeId" in req body on volume actions

We should check whether the parameter "volumeId" is in request body while
attaching a volume to an instance and while swapping volume.

Change-Id: I0be2ae4c80615c0304cd1a0d8ca0a4282a0867c7
Closes-Bug: #1257135
Rename Openstack to OpenStack

Change-Id: Iacc51d8ad071c3b22b7bb6b21cff972599b59a7b
Fix the calls of webob exception classes

The webob exception classes has "explanation" arguments but some
methods calls the classes with invalid arguments. This patch fixes
them.
In addition, this patch changes the error handling of agent_build
_create() because the method raises AgentBuildExists exception only.
The API of v3 has already done it.

Change-Id: I2af5aae297c09ed34fadf6520f1a06228624a5a9
Fix HTTP methods for test_attach_interfaces

delete() method of attach_interfaces API is routed when specifying
"DELETE" as HTTP method, but some tests specify "POST". This bug
does not affect the test behaviors because the tests do not check
API router behaviors and just checks delete() method behaviors.

However, this patch fixes this bug because the bug confuses the
API router behaviors.

Change-Id: I8e862cbd58da820eb336d3ef41185e16f63bb6be
Fix the explanations of HTTPNotFound response

Nova wsgi framework gets "explanation" from HTTPNotFound exception and
outputs it into a response body as "message" attribute. Now some error
explanations are passed to HTTPNotFound exception without explanation
argument and they are not output to a response body. As the result,
the default message "The resource could not be found." of wsgi library
are output to a response body instead.

This patch fixes them to output right message to a response body.

Change-Id: I80d3a2da6258e94c485ce024eb310a63bcf39773
Closes-Bug: #1285437
Added os-security-groups prefix

Added os-security-groups prefix to the security_groups attribute in json response.

Change-Id: Id2a4a92da0c9751abc5c37f06fc2484ba80a8a09
Closes-Bug: #1223309
Fix log messages typos in rebuild_instance function

One log message typos in rebuild_instance function.

Change-Id: I0c86a40b6683f3a8a091134b6f37c82a4562370e
Closes-Bug: #1288661
Rescue API handle NotImplementedError

There are several nova virt drivers that don't implement the rescue API,
but the os compute API doesn't handle NotImplementedError,
it returns a 400 instead of a 501.

The patch add the proper logic to return a 501 instead.

Change-Id: Ia649c4dadd50985efed631ce8f3e4b212646766e
Closes-Bug: #1287367
Add conversion type to LOG.exception's string

Add conversion type for 'String Formatting Operations' to
LOG.exception's string in _get_floating_ips_by_fixed_and_port().

Change-Id: Iec97a354176e3044064bf190735257080be7ae70
Closes-Bug: #1289230
Fixup debug log statements in the nova compute manager

We were mishandling instance logging in a few places.

Change-Id: Ie1ec44fb5092ca9229e037328def52cb6aa81c33
VMware: delete vm snapshot after nova snapshot

When performing a nova snapshot, the vmware driver takes a VM snapshot
and copies out the snapshotted disk. After the operation, the VM
snapshot should be deleted, to prevent growing disk chain(s) on each nova
snapshot.

Closes-Bug: #1252967
Change-Id: I7861ccce0153e45eea0316a2e8dd824210db1660
Fix broken API os-migrations

The return is not what we are expecting:
  migration-list: 'unicode' object has no attribute 'iteritems'

The conversion of the object nova.objects.MigrationList into a list
is not applied automatically.

Change-Id: I1579b1baf62275bf448f23be9465d4e9bc11ed85
Closes-Bug: #1260249
Delete meaningless lines in test_server_metadata.py

Some meaningless lines were found in test_server_metadata.py.
I deleted those.

Change-Id: I3f04bc0d4c9048281293ed78e4ba7ea4a2b26864
Remove bad log message in get_remote_image_service

There was a LOG.debug() message in the
nova.image.glance.get_remote_image_service() call that was incorrect and
misleading:

LOG.debug(_("fetching image %s from glance") % image_href)

This function actually does not fetch any image from Glance -- rather,
it is just used to get the default image service object or an image
service object for use with a remote Glance server.

Change-Id: I2b71c2c52d6593ad4677767a6f2bb40c399fe9eb
Closes-bug: #1292984
VMware: enable booting an ISO with root disk size 0

There may be cases where booting from an ISO does not require
any local disk. In this case the flavor may have the root disk
size set at 0.

Change-Id: Id290a0ede11c754f686d3b70322c84c03f161637
Closes-bug: #1292633
Correct inheritance of nova.volume.cinder.API

nova.volume.cinder.API was deriving incorrectly from nova.db.base. This
patch simply removes that unnecessary import and changes
nova.volume.cinder.API to derive from object instead.

Change-Id: I5092b7fbb3780317a09a512aed7ecbe1d57a4428
Closes-bug: #1292997
Don't import library guestfs directly

Library guestfs is not in requirements file, but is imported directly
in nova/virt/disk/vfs/guestfs.py. That conflicts with global variable
guestfs, leads out one more time import and shadow issue, so remove it
from import group.

Closes-Bug: #1293298

Change-Id: I55530ed682ebf449673759ab6127bcd28cb92594
Fix comment for block_migration in nova/virt/libvirt/driver.py

Change-Id: Iab2896189f70420e1e15779e6632cb3a33e1c321
Closes-bug: 1293353
VMware: fix rescue disk location when image is not linked clone

A rescue of a VM that has an image which is not linked clone would
create the rescue disk in the original VM's folder and not in the
rescue VM's folder. When the unrescue takes place the rescue disk
will not be deleted.

The patch adds unit tests that validates that the rescue disk location
is correct.

Change-Id: I17dfcade0a162057219bc6d108987bec53f526f9
Co-authored-by: Vui Lam<vui@vmware.com>
Closes-bug: #1293435