Add lockfile>=0.8 to requirements.txt

The new oslo version of the oslo db.sqlalchemy module depends on the
lockfile package. This patch will be used by a following patch which
will sync the new db.sqlalchemy module from oslo to Ironic.

Change-Id: I2540c324b4863405681cb8aac90a4b139e931318
Related-Bug: #1272500
Sync db.sqlalchemy code from Oslo

Patch contains common code from Oslo, we need to sync this modules to fix
a problem with a newer version of sqlite and the db.sqlachemy module that
is causing some of tests to fail if the version of the sqlite is >=3.7.16.

The patch also includes the code needed with the transition from migrate
tool to alembic, these base migration classes depends on the py3kcompat
and test modules which were also added to the project.

Closes-Bug: #1272500
Change-Id: Ifcd1254f16506a4247523056d6ad4ad8d7aefdac
Improve handling of invalid input in HashRing class

HashRing __init__ and get_hosts shouldn't be passed None,
but if they are, an appropriate error should be raised.

Change-Id: I139e7410c43bf4ac0f3357797ad767fde9455e36
Closes-bug: #1274762
Replace CONF.set_default with self.config

There is special method in ironic test base class dedicated to
override config options. This patch replaces explicit CONF calls
in unit tests by this method.

Change-Id: I439d26954e013fa6baa20538aa11610ca2313679
Fix missing keystone option in ironic.conf.sample

Add missing keystoneclient option 'enforce_token_bind' to ironic.conf.sample.

Change-Id: Ie4e555dad11c0f01776c3865415f663045cb221e
Add futures to requirements

Add futures to requirements since we need them for 69135 and 63904.

Change-Id: I5f032468c751256bf64abc31ebe0ad1cd26fd2c8
Updated from global requirements

Change-Id: I33b918d8fd937fd1b97053eced2a8e3293a7ad39
Merge "Add lockfile>=0.8 to requirements.txt"
Merge "Sync db.sqlalchemy code from Oslo"
Removed duplicated function to create a swap fs

The mkfs() function in common/utils.py already can be used to create
a swap fs on a device, so there's no need to create another one in the
deploy_utils.py file.

Change-Id: I0e1983d53b43d69b350cff462e975984ce2d86c9
Move test__get_nodes_mac_addresses

Move test__get_nodes_mac_addresses into the correct test class,
PXEPrivateMethodsTestCase.

Change-Id: Ie162a01a0ade385078892f9dd3c358a0f4c4a3ea
Merge "Replace CONF.set_default with self.config"
Imported Translations from Transifex

Change-Id: Ia16ded15912227587e41a062ff2a0e346b0d47df
Merge "Removed duplicated function to create a swap fs"
Merge "Updated from global requirements"
Merge "Imported Translations from Transifex"
Merge "Move test__get_nodes_mac_addresses"
API tests to check for the return codes

Some API tests were just checking whether a particular request would
raise a generic exception (webtest.app.AppError) or not, and this is not
enough, the API tests should make sure that the request will raise an
exception (expect_errors=True) and also check if the HTTP code returned
is appropriated for that error.

The FIXME left at test_remove_fail() is going to be fixed by a following
patch.

Closes-Bug: #1275812
Change-Id: I156749b3de0627c6d322192c397bbfe33919cf2d
Handle multiple exceptions raised by jsonpatch

The jsonpatch.apply_patch() might raise different types of exceptions,
this patch improve the exception handler on the jsonpatch.apply_patch()
call to capture them and also creates a new exception called PatchError
to avoid replicating the same error message across the resources.

The patch also doesn't log the exception raised by the apply_patch()
anymore, since the problem will be returned to the client directly via
the API response.

In the chassis.py an alias "api_utils" was created to the utils module
to be more consistent with the ports and nodes resource.

Closes-Bug: #1271554
Change-Id: Ied1f5e573839520cc5f4e04548720f016f33349b
Fix 'run_as_root' parameter check in utils

Because 'run_as_root' is boolean parameter we need check it value.

Change-Id: I18876081f98bcafd89e42b1352c933d7ab87d7cc