Add super call to db Base class

Without this call, multiple inheritance involving the db Base
class does not work correctly.

Change-Id: Iac6b99d34f00babb8b66fede4977bf75f0ed61d4
correct the bugs reference url in man documents

All the bugs reference in nova man documents are incorrect.
Nova bugs are managed at launchpad, not the nova.openstack.org

Change-Id: Id5bbf09ad8ba079d4de959314123437031ded3ab
Fix run_tests.sh lockutils when run with -d

Change I007bd39e4d9aad7539b4b7389eb5189b5d1f10e2 fixed how the test
runner was called, but did not take into account that a different
command line is used when -d flag is passed to the script. We fix that but
accounting for the lockuitls change even when -d is passed.

Change-Id: I7462b70a707fff281fabe9d9f20cbb7bf8d037ef
Explicity teardown on error in libguestfs setup()

Previously, in the setup method of the libguestfs driver
for Nova's VFS, on an error the handle object was simply
dereferenced (set to None), and then an new error was thrown.
This relied on an implicit close() on the handle being called
by GC.  However, in some cases the setup progresses far enough
that the implicit close is not enough, and leaves an "orphaned"
libguestfs VM.

Now, the teardown() method is called explicitly, which ensures that
no "orphaned" VMs are left around in case of an error.

Change-Id: I7fbe470046ce6c76bc13d77d8df360351a3ef715
Fixes: bug #1270304
changed quantum to neutron in vif-openstack

Change-Id: I50c14066584527a6fbc25c59b0bf03a321a5f1f5
Fix upper bound checking for flavor create parameters

Fix flavor-create upper bound checking so it uses platform-independent
32-bit max signed integer value instead of sys.maxint, which causes
problems on 64-bit platforms.  The DB int type is a 32-bit signed
integer, regardless of platform.

Change-Id: I82624121a45f6385d3ea9ae9c032109834584fac
Closes-bug: 1278939
Fixes the Hyper-V VolumeOpsTestCase base class

The VolumeOpsTestCase base class inherits incorrectly from
HyperVAPITestCase, with the unwanted side effect of executing all
base class tests as well.

This patch generalizes a common base class from HyperVAPITestCase
and fixes the inheritance issue.

Closes-Bug: #1280379

Change-Id: Ic81beb8397138c16c8d2d88a9c9d05d2b76e0e83
Add mkfs to the baremetal-deploy-helper rootwrap

The nova-baremetal-deploy-helper uses the mkfs command to
format the ephemeral partition (if configured). The
command works today because it is also defined in the
compute.filters file but we should be explicit here.

Change-Id: I79c31ffd26ff92d35d3d9836f2a8954a9a07c2c0
Add comment/doc about utils.mkfs in rootwrap

We call mkfs in nova/utils.py as well. Updates
the rootwrap file so we document this.

Change-Id: I58a3f4686735f45ee1aafe698f6662ff9d70e1f1
Ensure parent dir exists while injecting files

Currently, if we inject a file to a not existing path,
the injecting will be failed with error 'No such file
or directory'.
Nova will firstly execute `mkdir -p` in folsom before injecting,
but this operation is lost from commit
72918415f2b6a241d6097a563aba55a849936591

This patch fix this bug by adding the `mkdir -p` operation as folsom.

Closes-bug: #1272829

Change-Id: If33a79c538e07cb25300db64ac7a9dee3d3b19c2
Fix incorrect kwargs 'reason' for HTTPBadRequest

webob.exc.HTTPBadRequest doesn't have attribute 'reason', and its
__init__ method doesn't have such parameter too, so if we use such
kwargs, it will not be accepted by constructor of base class
WSGIHTTPException, then the http response body will format message
using default explanation instead of what we expected.

We should use kwargs 'explanation' instead of wrong 'reason'.

Change-Id: I02619164176a723e313ae274e527948d45fa6cad
Closes-Bug: #1264223
compute: format_message is a method not an attribute

The method format_message used to convert an exception to a string
it uses as an attribute. This patch fix the problem.

Change-Id: Ia1af1644f64d9d12edc905d2ec613aef1927e644
Add boolean convertor to "create multiple servers" API

"create multiple servers" API contains "return_reservation_id" as an
attribute, and the attribute should be boolean. There are the other
boolean attributes such as "on_shared_storage" of evacuate API, they
can be passed with either boolean or string(e.g. "True"). For the
consistency of whole Nova APIs, this patch adds boolean convertors to
multiple_create API.

Change-Id: Id6f458a2ced869a31d5d25d661309973132e9360
Closes-Bug: #1281440
Adds create backup server extension for the V3 API

Moves create_backup functionality out of admin_actions
into its own extension. This is part of blueprint v3-admin-actions-split
which allows more selective enablement of features contained
in the admin actions extension.

Note that XML api samples are no longer generated because bp
remove-v3-xml-api has been approved.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-create-backup extension and moves the
create_backup functionality out of os-admin-actions into
this new extension.

Change-Id: I4858a06df20c552bd55ff2841adbcfc761304f42
VMware: fix datastore selection when token is returned

Use the token returned by the PropertyCollector to iterate
over the complete set of datastores and select the best
match based on the regular expression and the free space on
the datastore.

Closes-Bug: #1245564
Change-Id: If24c37a41bfa994a990aaa4a3e21d16b33aad42f
Removing redundant validation for rebuild request.

Any method decorated with wsgi.action will need to have
the said key, in this case 'rebuild', before it
reaches the relevant code block. If not, a key
error is raised when the wsgi.action code kicks in. This
code is at openstack/wsgi.py in the  _process_stack
method and subsequently the self.get_method method.
A KeyError is raised and caught. Removing the redundant
check for rebuild api.

Change-Id: I4baf920c7e1b3d51a91323f12d0802cedec77fe2
Downgrade the log level for floating IP associate

When a deallocating for an instance, it might find a floating
ip is already disassocated, this patch downgrade the loglevel
from exception to info and add floating ip address into the log.

Change-Id: I119c78270c2b24937484329e8fbaaa22546ea021
VMware: add instance detail to detach log message

Provide extra details when detaching a volume from an instance.

Change-Id: I043bce041f82d18379ffc052ad8868ac425167fe
Replaces exception re-raising in Hyper-V

In a few cases in the Hyper-V driver classes, generic exceptions
are getting caught, logged and a domain specific exception is raised.

This creates issues in identifying the exception cause programmatically
(e.g. in unit tests).

This patch enforces the usage of excutils.save_and_reraise_exception()

Closes-Bug: #1280363

Change-Id: I27cc54941c5f592ea567ccaa8fa369362da1427f
Move the metrics update to get_metrics

It is not necessary to update the metrics when get every metric in
one compute monitor plugin, just update once when get metrics for
the monitor plugin.

Change-Id: Ib665188964de8318f6d94343891666c674111c8c