Fix v3 hypervisor extension servers action follow REST principles

The orignial hypervisor servers action as below:
'/os-hypervisors/[filters]/servers'

Change it as:
'/os-hypervisors/[hypervisor id]/servers'
And tt will return all the servers on the specific hypervisor.

Partially implements: bp v3-api-extension-versioning

DocImpact

Change-Id: I6c252372af67eda79f670199deb6592c02603c33
Add expected_errors for extension evacuate v3

Partially implements bp v3-api-extension-versioning

Change-Id: I1a36c7f6ca517b9696c90fc35ae5c0fb74975159
Config drive attached as cdrom

Some guest OSes (e.g. Windows) require config drive to be a cdrom device
to access the iso9660 filesystem on it. Option config_drive_format is
therefore set to also control the device type of config drive. If it's
set to 'iso9660', config drive will be cdrom; if it's 'vfat', config
drive will be disk.

DocImpact
Fixes: bug #1155842
Change-Id: I6c08b1b8040a1fd0db8e2b3b1fc798060733001f
Implements host uptime API call for cell setup.

Fixes bug os-hypervisors/<id>/uptime fails in cell setup.Implements
'get_host_uptime' for cells_api, which returns hypervisor uptime
from the target child cell.

Fixes bug LP 1192911

Change-Id: Iac75e46e565f17c91117dcb810f6d2f2e62708d8
Merged flavorextradata extension (ephemeral disk size) into core API

Partially implements blueprint nova-v3-api

Change-Id: I03ff8661f1b98fb25399ed230da79fcd94014312
Make ServerXMLSerializationTest DRYer

Move server's description info to setUp() to get rid of duplicate data.
Make user's and admin's attributes static class variables and
extract function which checks obligatory admin/user attributes.
Extract function which checks amount and values of fields in XMLized result.

Blueprint: nova-tests-code-duplication
Change-Id: Iffaec9555476cb8006130ec97f455d7810815970
Add expected_errors for extensions services and server_password v3

Partially implements bp v3-api-extension-versioning

Change-Id: I7e265eef705c2bba9cd9b22b1ff9076859496ee8
Add expected_errors for extension_info V3

Partially implements bp v3-api-extension-versioning

Change-Id: I39a72f7765f2cd652b8fbe4a9f7009fe4072d959
Add expected_errors for extension cells V3

Partially implements bp v3-api-extension-versioning

Change-Id: Iae888a84a799edfe2991221ff1083b6acd004e48
Fix extension server_meta follow API v3 rules

* add decorator expected_errors
* change 'meta' to 'metadata' for show and update that is
consistent with other actions
* use is_valid_body instead of catching AttributeError and ValueError,
because AttributeError and ValueError is too generic.

Partially implements bp v3-api-extension-versioning

DocImpact

Change-Id: Icdb353b077620c1ba690f3679dea6a8956847d36
Add expected_errors for extension instance_actions v3

Partially implements bp v3-api-extension-versioning

Change-Id: Ib9eb515363d9a83258a22381420244c752c7f0ed
Disable per-user rate limiting by default

The rate limiting enabled via api_rate_limit, is per user rate limiting
which does not protect against intentional DOS, instead DOS rate
limiting should be elsewhere. Furthermore useful values for this are very deployment
specific.

* Private deployments simply don't need it.
* Public deployments need something more sophisticated (queue depth based,
  not static values).
* Folks that do want it as belt-and-braces want semi-decent defaults
  but there is no need to default it on.

Part of more sane defaults effort.

DocImpact

Change-Id: I5451f6f90a6448c838612f180f0af750213a62bf
Moves scheduler.rpcapi.prep_resize call on compute.api to conductor

This change moves the scheduler.rpcapi.prep_resize from
compute.api.resize to conductor and it calls
conductor.api.migrate_server instead.

This is part of other changes that will completely move cold
migration to conductor.

Next change will move compute.rpcapi.prep_resize and all
related logic from the scheduler to conductor.

Partially implements bp cold-migrations-to-conductor

Change-Id: I2eaff7e94c77deb03a6843f316e243b284e31666
[xenapi] Unshadow an important test case class

A recent commit added a shadow of the VMOpsTestCase test class in
nova/tests/virt/xenapi/test_vmops.py.  This renames the class to
eliminate the shadowing.  It also removes an unnecessary setUp()
method.

Fixes bug 1206703.

Change-Id: I6f36cea7d926c5773cfee1c5868c72acf56f3220
Merge "[xenapi] Unshadow an important test case class"
Correct status code and response for quota_sets API v3

* Modify the response of update quota include 'id' that is same
with show quota.
* Change the status code of delete to 204.
* The request body of update have needn't 'tenant_id' and 'id', so remove them
from NON_QUOTA_KEYS.

Partially implements bp v3-api-extension-versioning

Change-Id: Id5bb149a911fa992a5cd374a3666ebfa976ec2c3
Fix flavor_access extension follow API V3 rules

* Add decorator expected_errors
* Correct the naming style for add/remove tenant access
* Add exception FlavorNotFound catching for add/remove tenant access
* Improve input validation for add/remove tenant access

Partially implements bp v3-api-extension-versioning

DocImpact

Change-Id: Icbf92115be6f33f943b3663373f84e1b12895225
XenAPI: Change the default SR to be the pool default

The default SR should be the pools default - but it might be unset
if a host has been removed from a host aggregate (i.e. removed from
the pool).  In this case make sure that we do give a decent error
message.

DocImpact - need to regenerate the defaults doc

Fixes: bug 1198239

Change-Id: I116f65ece94f839e63b085480ba4f8974119d2bb
Fix extensions agent follow API v3 rules

* Add decorator expected_errors
* Use AgentBuildExists instead of generic exception catching in create
* Use HTTPBadRequest instead of HTTPUnprocessableEntity
* Rename the request parameter 'para' to 'agent' for update

Partially implements bp v3-api-extension-versioning

DocImpact

Change-Id: I45203203b8396517ef94e604366183ce93810205
Merge "Add expected_errors for extensions services and server_password v3"