Update openstack/common/lockutils

The following commits are in this update:

79e6bc6 fix lockutils.lock() to make it thread-safe
ace5120 Add main() to lockutils that creates temp dir for locks
537d8e2 Allow lockutils to get lock_path conf from envvar

Change-Id: I2190d0aae72ef4a29daf8f7d960da82a33b331b4
Remove deprecated instance_type alias from nova-manage

Was deprecated in Havana, so now that we are in Icehouse lets
remove it.

UpgradeImpact
Change-Id: Ieb3775e0a43084d00624f9e1d8b879c312e32b3c
Deprecate/remove scheduler select_hosts()

This call is no longer used and can be removed from the scheduler api and
drivers. For backwards compatibility, the existing manager method is kept
but instead call driver.select_destinations() and convert the result to
the old format.

Conductor manager, as the last user of this call, used it to select
a target for live migration, but now instead makes calls to
select_destinations() to get the same information. The related change
to conductor manager is here: https://review.openstack.org/#/c/52311/

Change-Id: I702515a086e7f33c48fa9ee106271c868b660540
Add boolean convertor to cells sync_instances API

cells sync_instances API contains "deleted" as the parameter, and the
parameter should be boolean. There are the other boolean parameters
such as "on_shared_storage" of evacuate API, they can be passed with
either boolean or string(e.g. "True").
For the consistency of whole Nova APIs, this patch adds boolean conv-
ertors to cells sync_instances API.

Change-Id: I4776539cfd723f302d10350757e1c341384c9ba2
Closes-Bug: #1261287
Changed error message to match usage

InstanceDiskTypeTooSmall is not the proper error message, it should be
FlavorDiskTooSmall.

Change-Id: Id928015534161cba296c17114ef2d19d96e8781d
Spelling fix resouce=>resource

Change-Id: I369d925573e6ce7b48f610051f3b53a4afbb3d0d
Do not use contextlib.nested if only mock one function

There are some test cases in test_compute_mgr.py using contextlib.nested
to mock up functions even there is only one function needs to be mocked.

We should use mock.patch.object directly if only mock one function.

Change-Id: I30f05d0dcb442d426358b673f0e638ace8b85e0e
Closes-Bug: #1263602
Add API schema for v3 agents API

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint nova-api-validation-fw

Change-Id: Iae1bff0e853e1dc597ebdca07efeb477b105469e
Add API schema for v3 keypairs API

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint nova-api-validation-fw

Change-Id: I484fc2807721b5bfe0f1a11c3811b99a13d920aa
Return policy error, not generic error

When nova net-create and net-delete are prohibited by policy, we should
raise policy violation error (403) to the user instead of service
unavailable (503) error which is incorrect.

Closes-Bug: #1260905
Change-Id: I2edc0eb09f1dc192ba47184ed24fc49e4fcd4b79
libvirt: stop overwriting LibvirtConfigCPU in get_host_capabilities

Currently, LibvirtConfigCPU configuration is being overwritten with baselineCPU
output. However, baselineCPU never reports the ARCH and other relevant fields,
that is being set in LibvirtConfigCPU by the LibvirtConfigCaps.
The absense of the arch field is causing the bug below.
Fixing it to simply update the LibvirtConfigCPU.

Change-Id: I9dd06fa44a232a333609fa115d05ad8822e21c0c
Closes-Bug: #1266534
Remove unused import

Remove unused import in openstack/common/db/sqlalchemy/session.py

Sync from oslo: Ia89d749f698a9bee71f70fbb7e723a0131bfccfe

Change-Id: Ie58a585bc058775cfd0eb0934a74aeb700fd09db
Avoid unnecessary use of rootwrap for some network commands

Every time we run something as root with rootwrap, it takes about
ten times longer (setup-wise anyway). For things that don't need
to be run as root, we should avoid this hit. Nova network does
this a lot and is also slow enough to cause trouble, so this
patch attempts to address that for a few situations.

Related-bug: #1257626

Change-Id: Idc26776bf96ccfd9f50383e9d40aa47397d4e2cf
Merge "Changed error message to match usage"
Merge "Add boolean convertor to cells sync_instances API"
Merge "libvirt: stop overwriting LibvirtConfigCPU in get_host_capabilities"
Merge "Deprecate/remove scheduler select_hosts()"
Merge "Spelling fix resouce=>resource"
Merge "Remove deprecated instance_type alias from nova-manage"
Merge "Avoid unnecessary use of rootwrap for some network commands"