Have tox install via setup.py develop

tox 1.6 was released, which means that we can now take advantage of the
feature we added to it - which is using setup.py develop to install the
code into the virtualenv. The logic was taken from run_tests.sh - so the
performance issues around using tox vs. using install_venv should now be
gone.

run_tests.sh is still needed to handle the ui switching between
parallel, single and debug modes to testr.

Change-Id: Ida5e440d1bdb9f8e9031277ea53a02d2ef171438
VMware: clean up get_network_with_the_name

By default the method returns None. No need to do this explicitly.

Change-Id: Ie18300bdfaaec8d9c813352fe42a2aebec730c45
Powervm driver now logs ssh stderr to warning

The run_vios_command, run_vios_command_as_root methods in
blockdevice.py and operator.py of powervm driver currently log
stderr at debug level, this commit changed it to log to warning
level rather than debug.

Closes-Bug: #1215019
Change-Id: I903067476049ead01c6c34392342d915917790b3
Fix virtual power driver fails silently

This patch changes the behavior of Virtual Power driver. VPD will
now raise an exception should the mac address for the node not
be found. It will also log the node name and mac address.

fixes bug 1201964
Change-Id: I04a275cf8d2cc7665720329000fbe087aa636b21
vm_state and task_state not updated during instance delete

This bug was recently introduced during conversion of the
terminate_instance to the new object models.
https://review.openstack.org/#/c/36363
Fixed by calling the save method of the new model.
Also updated tests to use primitive instance so it is
converted to new object model by object_compat decorator
in the compute manager.

Related to: blueprint compute-api-objects
Fixes: bug #1212496
Change-Id: I4f4e45160008d3eb57f4f0935f13e22b6a561430
Libvirt: call capabilites before getVersion()

Updates the Nova libvirt driver so we make a call to get
the driver capabilities. This is clearly a work around
but it does allow nova-compute to startup cleanly when
performing a clean install of Fedora 19.

See notes in: https://bugzilla.redhat.com/show_bug.cgi?id=1000116

Fixes LP Bug #1215593.

Change-Id: I2c74dc001032e3cc4d7d55a3fa407b96fd0d0e78
Port Cheetah templates to Jinja2

Cheetah is unmaintained since 2010 and it's unlikely to get Python3
support soon. Also, the rest of OpenStack (mostly) standardized on
Jinja2.

Implements: blueprint jinja-templating-conversion
Change-Id: Ia15f00ee96d3c1d55d7c290f20ccc988e4c52e1a
Fix AggregateDBApiTestCase on PostreSQL and MySQL

Test methods of AggregateDBApiTestCase use hard-coded
instance ids values instead of ones returned by *_create()
DB API methods. This imposes the following restriction on
autoincrement behavior: it must always start with 1 (which
might not be true, if a DB is not recreated for each test
case).

Blueprint: db-api-tests-on-all-backends

Change-Id: I4712c5d91c22b3b531048340f3cc827ce5ac438d
Improve EC2 API error responses

This is a final patch from series of patches improving EC2 error
responses that makes finishing touches.

Useless EC2APIError exception is finally annihilated. Nova exceptions
that were raised outside of EC2 API are now translated to appropriate
EC2 error codes using ec2_code attribute.

With EC2 exceptions fixed, HTTP status code corresponding to raised
exception is now returned instead of previously hardcoded 400. All
expected exceptions are treated as client errors and returned with 4xx
HTTP status code for compatibility with EC2 API.

Unexpected exceptions are now always logged on ERROR log level, CRITICAL
wasn't really appropriate.

Following valid EC2 error codes were added to existing exceptions
eliminating the need to translate them explicitly:

 * InvalidKeypair.ec2_code = 'InvalidKeyPair.Format'
 * KeyPairExists.ec2_code = 'InvalidKeyPair.Duplicate'
 * QuotaError.ec2_code = 'ResourceLimitExceeded'
   (*LimitExceeded exceptions inherit from QuotaError)

Exceptions caught in Executor were reordered for better readability.

Implements: blueprint ec2-error-codes

Change-Id: I27f9397d006f1b66b53a91b04ec6763a4d8ac740
Add support for API message localization

Using the lazy gettext functionality from oslo gettextutils,
it is possible to use the Accept-Language header to translate
an exception message to the user requested locale and return
that translation from the API.

Implements bp user-locale-api

Change-Id: I446fdf4b9843155e0c818c271114b1e2e4f43b64
Port flavormanage extension to v3 API Part 2

Ports the flavormanage extension and the corresponding
unittests to the v3 framework.

Partially implements blueprint nova-v3-api

Change-Id: Iaf6b4a2d7f4e4993a6540e8a3afc774b7b158608
Make compute_api use Aggregate objects

This makes the compute_api's AggregateAPI use the new Aggregate
object for its work.

Related to blueprint compute-api-objects

Change-Id: I97419bfe6c605306bd64f9aa4fce9657509df260
Fix a gross duplication of context code in objects tests

Because of the way we dual-inherit classes to get the local
and remote testing of objects, laziness caused us to duplicate
the code to get a context object all over the place. This
patch cleans that up.

Change-Id: I9b65968781afbecd0db72073299c019f8cc10241
Port all rpcapi modules to oslo.messaging interface

Add a temporary nova.rpcclient.RPCClient helper class which translates
oslo.messaging.rpc.RPCClient compatible calls into calls on a RpcProxy
object.

Use this new class to port all of the rpcapi modules over to the new
RPCClient so that the final port of Nova over to oslo.messaging will be
smaller and easier to review.

This patch contains no functional changes at all, except that all client
side RPCs go through this temporary helper class.

blueprint: oslo-messaging
Change-Id: Iee86c36bcc474a604993618b8a2255af8c3d2f48
Adds metrics collection support in Hyper-V

Blueprint: hyper-v-metrics

Hyper-V Server 2012 supports a new set of metrics API that can be used
to provide instance metrics data to external applications, e.g.
Ceilometer.

Metrics collection is disabled by default and can be enabled with a
config option.

Change-Id: I3523888c6bdd22f488c273c9e3eea1083a479700
update neutronclient to 2.3.0 minimum

Change-Id: I21f9ae030a173621db3d21db018c3a416d050813
Remove versioning from IOVisor APIs PATH

Fix bug #1220454

In the first version of the IOVisor driver, versioning was included in the
the PATH of the native IOVisor commands which was /opt/pg/bin/0/
In the current version, versioning has been deleted from the PATH and
now it should only include /opt/pg/bin/

Change-Id: I2b88eb28593043843a9ac0afd5bff7c268db0f60
Merge "Improve EC2 API error responses"
Merge "Have tox install via setup.py develop"
Use utils.execute instead of subprocess

Removes rogue subprocess.Popen calls to make better use of
nova.utils.execute where appropriate to benefit from the
patches pushed into oslo.

Fixes bug 1053382

Change-Id: Iaee5379edd51f215a51d55263196dd6c0d2de0c3