Set a sane default for state_path

This change sets a sane default to state_path and puts the previous
state_path for tests only.

Because the default value of state_path changed, if this one isn't set in the
configuration file, pybasedir is not more used as replacement but /var/lib/nova
is used instead.

UpgradeImpact
DocImpact
Closes bug: #1240879

Change-Id: I94502bcfac8b372271acd0dbc1710c0e3009b8e1
Make image props filter handle old vm_modes

The ImagePropertyFilter would fail to build an instance if the image
used an older style vm_mode (e.g. 'pv') as described in
nova.compute.vm_mode.  This change will convert the vm mode string to
the current form.

Change-Id: Ibde37e28b02d9e866b286ea14c47a6a8411d94b4
Closes-Bug: #1276773
Fix baremetal stats type

As of 8a7b95dccdbe449d5235868781b30edebd34bacd the resource
tracker code is expecting stats to be a json string.  Baremetal
was setting it to a dict and it was breaking the db write.

Change-Id: I708fecd623c1a42d002c2b20bfdf06b625c9c287
Closes-Bug: #1279572
VMware: fix bug for exceptions thrown in _wait_for_task

If the _call_method fails, for example a resource is not found,
then the same call will be invoked again due to the fact that the
polling task was not stopped.

Closes-Bug: #1246848

Change-Id: If4818e41aed5be03395ab22afc0edf9abb3c34e1
Move policy check of start/stop to api layer

This patch moves "compute:start/stop" to api layer for ec2 and nova
v2 api, and uses "compute:v3:servers:start/stop" for nova api v3.
Also removes policy check from compute api. And give default rules
for v3 policy check.

Add core_authorizer with 'compute:' as the scope of core api in v3.
That's for distinguishing core and extension api. Use different namespace
for policy. The policy of core api will be 'compute:v3:extension_name'.

Partially implements bp v3-api-policy
DocImpact

Change-Id: I6c4f1c677b64015c61440f9db941d1ab9cf77b48
Adds migrate server extension for V3 API

Moves the migrate/live-migrate server functionality out of admin_actions into
its own extension. This part of the blueprint v3-admin-actions-split
allows more selective enablement of features contained in the admin
actions extension.

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

Refactor removes some exception handling for migrate along with the relevant tests
as those exceptions will never occur.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-migrate-server extension and moves migrate/live-migrate
functionality out of os-admin-actions into this new extension.

Change-Id: I6b29f501ad6bb9a6401b1c20cd419d9e05fe369b
Merge "Move policy check of start/stop to api layer"
Merge "Set a sane default for state_path"
Merge "Make image props filter handle old vm_modes"
Merge "Adds migrate server extension for V3 API"
Merge "VMware: fix bug for exceptions thrown in _wait_for_task"
Merge "Fix baremetal stats type"