Implement consistent hashing of nodes to conductors

Implement the consistent hashing of nodes to conductors.

Implement automatic routing of RPC messages from the API tier to the
conductor tier, by using the consistent hash ring.

Improves _sync_power_states to only check the nodes mapped to that
particular conductor.

Add a stub for a rebalance method which can trigger certain actions by a
conductor when a node is mapped to it by changes in the hash
distribution.

blueprint instance-mapping-by-consistent-hash

Change-Id: Ib74a8ded49e4a85964c46d4a445ff0a2df39862a
Adds Neutron support to Ironic

Ironic needs to inform Neutron of an instance:conductor change,
so that Neutron can appropriatedly forward DHCP BOOT requests
to the correct conductor. In addition, Ironic will need to update
this information in Neutron when the mapping conductor becomes
unavailable.

Change-Id: Iad8b110a7c690d2ee1c4af59103f5ecdd6a89e10
Implements: blueprint add-neutron-support
PXEAndSSH driver lacked vendor_passthru

Add vendor_passthru interface to PXEAndSSHDriver
to allow PXE-based deploys to continue.

Change-Id: Ief087f75b0b6975ed2b461f46cddcc9067316efe
Closes-bug: 1268066
Make the PXE driver understand ephemeral disks

Allows the PXE driver to create an ephemeral partition. This is the first
step in being able to redeploy a baremetal machine with a new image but
preserve the data on the ephemeral disk.

Ported from Nova: https://review.openstack.org/51735

Change-Id: I2826f1f8b60316ea180284cffc495a7556e31784
Closes-Bug: #1238311
API to check the requested power state

API to make a sanity check on the requested power state, before the API
was just passing whatever state requested by the user via RPC to the
conductor and it would fail there in case the state request wasn't valid,
giving a late feedback to the user and wasting resources.

As the same check is done on the provision method, a new exception was
created to reuse the exception message.

The patch also update the docstrings of the power() and provision()
methods to reflect the exceptions they might raise.

Change-Id: I47f957f738ef922b01b2c604180d8b6efe20ce8c

Conflicts:
	ironic/api/controllers/v1/node.py
Add RPC method for node maintenance mode

Method 'change_node_maintenance_mode' added to manager and rpcapi.
This method triggered maintenance mode for a node.
New column 'maintenance' added to nodes table.

Partial-Bug: #1260099
Change-Id: I945a1ce72c04e5ee2a9427a58dae72b0719c160f

Conflicts:
	ironic/conductor/rpcapi.py
	ironic/tests/db/utils.py
Disallow new provision for nodes in maintenance

New deploy operation will not allowed for nodes in
'maintenance' mode.

Partial-Bug: #1260099
Change-Id: Idaf8c3d70bd78b2c95bbdcff734e235eb8063d91