Check the length of aggregate metadata

PostgreSQL gives an error if you try to shove 256+ characters
into a 255-character field. So we need raise a HTTPBadRequest
explanation if the length of aggregate_metadata.keys or
aggregate_metadata.values is above 255.

Change-Id: I2c778f2237ba5bd2aa8335a0eae80f3aad3e9157
Closes-Bug: #1219693
Add unit tests for ipv4/ipv6 format validation

We found a bug that the other jsonschema format check('uri') did
not work for input validation. There was not any unit tests for
the format check, then we could not find it in long term.
The bug is fixed with Ibb2b7f27c374136e6865b28786d10ca1365e5709 .
And this patch adds unit tests for the format 'ipv4' and 'ipv6'.

Change-Id: I6f6636708e3f9a4eee14451f2baacb50002f1db8
Related-Bug: #1326599
Separate the PCI device object handling code

Currently the PCI device object includes several functions like
alloc/free/claim etc. However, the NovaObject should not be used
this way, and it makes the PCI device object really different
with other NovaObject implementations.

This patch duplicates the PCI device handling code as separated
functions. No logic changes but simply code copy. A later patch
will delete the code at PciDevice object.

Closes-Bug: #1273852

Change-Id: I2389d29218d8619998f8df973004af004e8b1b76
Deprecate neutron_* configuration settings

Create a new section in the configuration file called 'neutron'.
Move all of the neutron_* configuration settings to this section.

DocImpact

The table below has the changes:

+---------------------------------+-------------------------+
| 'DEFAULT' Section               | 'neutron' Section       |
|---------------------------------|-------------------------|
| neutron_url                     | url                     |
| neutron_url_timeout             | url_timeout             |
| neutron_admin_username          | admin_username          |
| neutron_admin_password          | admin_password          |
| neutron_admin_tenant_id         | admin_tenant_id         |
| neutron_admin_tenant_name       | admin_tenant_name       |
| neutron_region_name             | region_name             |
| neutron_admin_auth_url          | admin_auth_url          |
| neutron_api_insecure            | api_insecure            |
| neutron_auth_strategy           | auth_strategy           |
| neutron_region_name             | region_name             |
| neutron_ovs_bridge              | ovs_bridge              |
| neutron_extension_sync_interval | extension_sync_interval |
| neutron_ca_certificates_file    | ca_certificates_file    |
+---------------------------------+-----------------------=-+

UpgradeImpact
The changes are backward compatible.

Change-Id: I3308be33f60c4add3e2e78b75f238059a9b3d876
Add configurable HTTP timeout to cinder API calls

Some Nova API calls require synchronous use of cinder.  (e.g. volume
list)  If the call to cinder lands on a slow performing or otherwise bad
cinder API node, the user of Nova API will see poor performance.

This patch adds the ability to control HTTP timeouts when calling the
cinder API.  By configuring a timeout, nova will be able to more quickly
retry its cinder request and hopefully land on a better performing
cinder API node.  This will help make the API response times more
predictable.

For backward compatibility, the default timeout value is None.

Closes-Bug: 1329797
DocImpact

Change-Id: I5cccced524d9a9d69ed41f755781d0b7ae3dc970
Fix doc for service list

If a service is enabled, the "disabled_reason" field in response
for /v2/.{tenant_id}./os-services/detail is null, however, currently
it's specified as "" in the doc, thus may be confusing to users.

This patch change the template and doc, it should not cause issue to
existing applications.

Change-Id: Ia71ec4c97a355bcc1a7b63e6107db77f80a5d843
Close-bug: 1328382
Add test for HypervisorUnavailable on conductor

HypervisorUnavailable is added in excepted exception list in conductor
function migrate_server in commit d0a5e272, but the test cases are not added.
This patch adds test cases for it.

Change-Id: I83556e97cb151ff202b2377c00122a368b1c2892
Imported Translations from Transifex

Change-Id: I43633b01e6a9b93b4d291f2bc900ea9851469921
Updated from global requirements

Change-Id: I4884005a65e9992447587588bac89b85b087bc4a
VMware: update file permissions and mode

Commit 17c5f92b6ab552f1ac21f8ce332053e35d1de919 set the wrong
file permissions and mode.

Change-Id: Iffcd2961161cc6380bb434628183fe7162cf6e8a
Cleanup and gate on pep8 rules that are stricter in hacking 0.9

Fix up pep8 failures for rules we previously gated on, but that are now
stricter in there enforcement.

Ignore E251 due to https://github.com/jcrocholl/pep8/issues/301

Change-Id: I62b33e97c44c4a5be436b381cfbdaeb31cd2638b
Enhance and test exception safety in hooks

This patch adds exception handling when calling pre and
post functions of hooks. Exceptions will be caught and
logged, but the hook chain and function call will be
allowed to proceed.

Partially implements: bp instance-network-info-hook

Change-Id: I45e76cd156c244ff57f77db103a9a579f14ad4f1
Add hook for network info update

This hook will allow deployers to register scripts that will
be called whenever an instance's network information is updated.
Scripts will be called with original arguments of the network
info update function call.

Implements: bp instance-network-info-hook

Change-Id: I56ff28d305cf8d9a67b37c45062256b3899f11dd
Merge "Deprecate neutron_* configuration settings"
Merge "Add test for HypervisorUnavailable on conductor"
Merge "Add configurable HTTP timeout to cinder API calls"
Merge "Updated from global requirements"
Merge "VMware: update file permissions and mode"
Merge "Imported Translations from Transifex"
Merge "Fix doc for service list"