Improve error return code of floating_ips in v2/v2.1 api

1.change exception.InvalidID from 404 to 400 when passing a invalid
id.

2.handle exceptions when calling get_instance_id_by_floating_address()
  FloatingIpNotFoundForAddress -> HTTPNotFound
  FloatingIpMultipleFoundForAddress ->HTTPConflict

3.change HTTPUnprocessableEntity to HTTPConflict when remove a floating
ip which is not associated the instance

Change-Id: I0c9cd5b50a2d3cf024e5c4c3506ae2d0e6394c88
Add delete not found unit testcase for floating_ip api

This patch adds unit test case for the delete api of
floating_ip extension.
V2 and V21 have difference return code when delete
a invalid when given a invalid id of floating ip.

This patch addes both nova-network api and neutronv2 api
test cases.

Partially implements blueprint v2-on-v3-api
Change-Id: I40a5b133c98e01e8f5c613b765b8d821beec03a6
Clear libvirt test on LibvirtDriverTestCase

We already create a class variable for connection,
no need to create each one for every test cases.

Change-Id: I635f5993888b21dc9b497e588057af5f794f55b3
Doc: Update i18n devref

The internationalization devref was out of date (and wrongly named). This
patch documents the current advice for internationalization.

Change-Id: If91b3b11c4050cb231b7d9c38b6beca8ba6ce236
Stop neutron.api relying on base neutron package

There is a weird namespacing issue happening here where the
nova.network.neutronv2.api package is relying on nova.network.neutronv2.
This is backwards from standard design and results in strange sharing
patterns when trying to do clean up.

Change-Id: I5e890c7b72c398e9625e590994d8c2afb9ce8897
libvirt: have _get_guest_numa_config return a named tuple

Have the method return an object. This makes the code a lot cleaner.

Change-Id: I209325ff587f6bca366a377475b03772daf519ba
objects: fix version changelog in numa

The version info needs to be incremented as well as
the object version.

Change-Id: Ie186e474aa41b5cb89c804aa426b20cec8d4c9e0
Use model_query from oslo.db

This change makes nova.db.sqlalchemy.api.model_query() a wrapper round
oslo.db.sqlalchemy.utils.model_query().

Arguments to model_query are brought in line with the version in
oslo.db, which removes the need for heuristic introspection of the
model argument. This creates some noise in the patch, as all callers
which previously used the base_model argument have had to be updated.

model_query from oslo.db returns a TypeError rather than a ValueError for an
invalid model, so the invalid arguments test is updated accordingly.

This requires N309 to have been disabled for sqlalchemy/api.py, as it
will complain about the session argument to model_query.

Change-Id: I3dc48c4ebb7ea4576429cf836bae995ede21ce30
use more specific error messages in ec2 keystone auth

Currently in the ec2 keystone auth, when status code != 200 the
response.reason is used for the error message only if
status code == 401. This change uses response.reason for the error
message for any status code != 200.

It also changes a message "failure communicating with keystone"
to "failure parsing response from keystone."

Change-Id: Ifdfc30ff260298637c437e5758983db53a86c0dc
Update devref with link to kilo priorities

Devref contains a document discussing project priorities.  Include a
link to the list of specific Kilo priorities that lives over in the
nova-specs repo.

Change-Id: I1770447b03df1cc1ab029780fada96fab8ccaa0f
objects: fix changed fields for instance numa cell

Commit 139529a90e6dfc60639887af77bbfab18b2638ab introduces
default fields. At this step of the construction we dont want
to consider fields has changed.

Change-Id: I34051813849c90d25a9c2377fb413b49935553b4
Make cells send Instance objects in build_instance()

This makes the cells rpcapi pass real objects through in the build_instances()
call.

Related to blueprint kilo-objects

Change-Id: I4a08274c34acedc58a2010a5f3093865bd1055d4
libvirt: don't pass a module import into methods

For some reason the 'vconfig' module import is being passed
into the _set_kvm_timers method. This serves no purpose other
than to confuse people.

Change-Id: If61e9855beddf66ac8a4fbfb59dc8bb2e22bdccf
libvirt: enhance to return avail free pages on cells

Update driver libvirt to return avail free pages memory
on numa cells.

Work-Item: Enhance libvirt driver to report available
           large pages per NUMA node in the host state data

Change-Id: If2e5b509df2a32464d040cd79b29368b60513cff
Partial-Implement: blueprint virt-driver-large-pages
Fix using anyjson in fake_notifier

For some reason we were using anyjson.serialize() in our fake_notifier.
That may have been to mirror kombu, but really we need to mirror what we
do when we convert our payloads to primitives, which is using jsonutils.

Closes-Bug: #1403162
Change-Id: I92a4708e0700e88f4b2554aa4e7ad3856f5be1e0
Merge "Make cells send Instance objects in build_instance()"
Merge "Improve error return code of floating_ips in v2/v2.1 api"
Merge "Add delete not found unit testcase for floating_ip api"
Merge "libvirt: don't pass a module import into methods"
Merge "Update devref with link to kilo priorities"