Sync common db code from Oslo

This sync contains commit - ce69e7f Don't store engine instances in oslo.db -
which removed global engine from oslo.db code. So, added code
for work with sqla engines and sessions to Ironic - get_engine()
and get_session() functions in ironic.db.sqlalchemy.api module.

Also this remove database slave connection and tpool features, because
they was removed from oslo code.

Latest oslo.db commit - 7959826af1f36a4bbc4c466d0d1e0b9efd468649

Change-Id: I14c3b823a8b975d5cd097778f3514cfb1abe2e10
Remove jsonutils from test_rpcapi

jsonutils.to_primitive() returns dict with the same key:value pairs as
dbutils.get_test_node() in test_rpcapi, therefore it can be removed.

Change-Id: Ic7516ffb5f886a7b7be96d97798161dfeda7b743
Refactor vendor_passthru to use conductor async workers

To acheive sync validation + async vendor action we used two rpc calls.
Currently we have async workers mechanism in conductor so this patch
changes vendor_passthru flow to:
rpc CALL -> validate -> spawn worker -> return driver info.

Also this patch moves vendor_passthru exclusive lock creation to
conductor level to have common lock for the whole method and prevent
races.

Change-Id: I9b0173841398d72b1818e986caf3d9a486cd205e
Remove redundant default value None for dict.get

if can not find the key in a dict,dict.get return
None alaready,so no need to specify it.

Change-Id: I45fd12452069d4c42adff71f07fc68bdafae18e4
Updated from global requirements

Change-Id: If068df940313b8d01cec340ddb589ac2ae47aeb3
Add libffi-dev(el) dependency to quickstart

This is required to build cryptography 0.2.1.

Change-Id: I397fe3c48ca65a3bed70bb5941c4bf9001aec717
Remove errors from API documentation

The API documentation mentions NodePowerState, NodeProvisionState,
and NodeVendorPassthru. They do not exist in the code, and their
entries here are error messages. Remove them.

Change-Id: I48c357cdf5d7ef2149b8af0becb517a578def97a
Import Nova "ironic" driver

Import the Nova "ironic" driver from the Nova review queue.
This Nova driver will not be present in the Icehouse release of Nova,
but is required for Ironic functionality and can be installed as an
out-of-tree driver.

Co-Author: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-Author: Devananda van der Veen <devananda.vdv@gmail.com>

Change-Id: I3351dee1a4b2dfb50317ce85dffe8012f0feca6c
API: Add sample() method to remaining models

Define sample() method on Chassis

Change-Id: I99fd77914bf4673053c3ebde7f5487da89cbc9c5
Closes-Bug: #1260337
Imported Translations from Transifex

Change-Id: Ic2a4f2c03cf92fec29f34f312a03c95ea4cba86f
Fix how nova ironic driver gets flavor information

Nova changed the way it access the flavor information, they now use the
Flavor object instead of getting it throught the VirtAPI.get_flavor()
call.

Also fix the import order in the driver.py

Change-Id: I4308d9c994a13f63003ee9426229b51063926c00
Merge "Add libffi-dev(el) dependency to quickstart"
Merge "Import Nova "ironic" driver"
Merge "Remove errors from API documentation"
Merge "Sync common db code from Oslo"
Only fetch node once for vif actions

This removes an unneeded refetching of 'node' from Ironic when plugging
and unplugging vifs.

Change-Id: I0050d956b2df8115540f7cf66a897f8f0c751d56
Pin iso8601 logging to WARN

API logs are filled with iso8601 noise when the log level is set
to DEBUG. This set it to WARN.

Change-Id: I509a9feefc67f7d7be221abbc2ffa3b7b720b3ea
Move v1 API tests to separate v1 directory

This commit adds a new v1 directory within tests/api
and moves the tests related to v1 API inside it.

Change-Id: Ia4cf177a6aed676a42ab9bd4e4420c290df546c9
Partial-Bug: #1255954
Merge "Fix how nova ironic driver gets flavor information"
Merge "API: Add sample() method to remaining models"