alembic with initial migration and tests

All sqlalchemy migrations and code associated
with them was removed including tests

Added all necessery alembic code to expose alembic specific features:
like revision and stamp

Added initial migration for alembic, that is fully in sync with models
including: uniques, indexes and columns params

Refactored test_versions to use alembic as migration api

Refactored BaseTestCase and Database fixture to use alembic as migration api

Change-Id: I8a91704d21ccea1b8135b9d724df5856ac21108c
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
Move test__get_nodes_mac_addresses

Move test__get_nodes_mac_addresses into the correct test class,
PXEPrivateMethodsTestCase.

Change-Id: Ie162a01a0ade385078892f9dd3c358a0f4c4a3ea
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
Fix log and test for NeutronAPI.update_port_dhcp_opts

The unit tets for NeutronAPI.update_port_dhcp_opts were raising the
wrong exception, and would pass regardless of the behaviour of
update_port_dhcp_opts.

This patch causes the mock to raise a neutron_client exception and
correctly asserts that ironic.common.neutron.NeutronAPI converts the
neutron client expcetion to an ironic exception.

It also adjusts the LOG behavior of this method to properly record
the exception traceback, which could be useful in determining the
failure in the neutron client.

Change-Id: I6f231b6a823386709b5778d140d6aa48ae4997ce
Implement a multiplexed VendorPassthru example

Change the Fake driver to use multiple VendorPassthru interfaces
to demonstrate to third-party driver authors one potential approach
to multiplexing multiple drivers together.

This is particularly useful when combining different power drivers
with the reference PXE driver, which has a component that must be
routed through pxe.VendorPassthru

Change-Id: I321c95454f8169a4990127af5bc94b602bc55aff
Merge "Improve handling of invalid input in HashRing class"
Merge "API tests to check for the return codes"
Merge "Handle multiple exceptions raised by jsonpatch"
Expose 'reservation' field of a node via API

Reservation field added to node API representation and
to internal attributes list (for prevent modification
by PATCH)

Partial-Bug: #1250348
Change-Id: I01211bf2ae4cadb8e76f99f75caecac35a861b92
Merge "Fix 'run_as_root' parameter check in utils"
Improve NodeLocked exception message

Message of NodeLocked exception does not contain information
which host asquired lock. This information will be heplfully
in multi-conductor configurations.

Change-Id: I8521248369bef23d46f7335a7412be8d3be828bf
Allow to tear-down a node waiting to be deployed

Introducing a new state, WAITDEPLOYING, those nodes which have failed
to POST and trigger the vendor_passthru._continue_deploy() can be
tear-down.

Closes-Bug: #1270986
Change-Id: Ib98f1ba6a29de46df9ce54941d0558df4f241f40
Fix broken doc links on the index page

Commit 017f99120b1 did not move documentation from dev/ to developer/.
The links on the index page were updated incorrectly.
This change reverts that and fixes the broken links.

Change-Id: Ia2f3703589c469bfc2a5204bdd3becc4b09efd0d
Return correct HTTP response codes for create ops

When creating {chassis,node,port} resources the incorrect HTTP
response code was being returned. (was 200, now returning 201).

Closes-Bug: #1272596

Change-Id: Ic0fb2cc1794841dcef7009990f0ae482d71b1242
Merge "Fix broken doc links on the index page"
Merge "Fix log and test for NeutronAPI.update_port_dhcp_opts"