Check requested image size

Add a sanity check to the prepare() method in the PXE driver to check
if check if the requested image to be deployed is larger than the root
partition size.

Closes-Bug: #1288007
Change-Id: I5d80b147a330aee2df237b4a1b82e2c6e990f148
Clean up openstack-common.conf

This patch clean up openstack-common.conf:
 * remove unused module sslutils
 * add missing module versionutils in openstack-common.conf

Change-Id: Ibf36a9e5507dcae3209227b563cc3ef566d976cd
Updated from global requirements

Change-Id: I7627967effc9a147efc614ef83d1ad9040818063
Corrects a typo in RESTful Web API (v1) document

The typo /v1/nodes/<uuid>/state is changed to /v1/nodes/<uuid>/states
Closes-Bug: 1311285

Change-Id: I66bc695298c04b423c9c9be45b23fce5b60727f0
Merge "Clean up openstack-common.conf"
Merge "Check requested image size"
Merge "Corrects a typo in RESTful Web API (v1) document"
Cleanup mock patch without `with` part 1

A good idea because it makes the code easier to read to get rid of
the `with` using mock.patch and mock.patch.object in favor decorators,
where possible in the tests.

This patch only affects drivers.

Change-Id: I564428a6315352f72ad3bad69bf7dd8cd88ffd9e
Merge "Updated from global requirements"
Factoring out PXE and TFTP functions

Multiple drivers need to support neutron and Ironic's PXE and TFTP
server. Factoring them out into a common file will make that
transition possible. I've moved all the generic calls into neutron
and reconfigured the PXE driver to work with the new functions.

Change-Id: I181ffabe673636b628329592e623e6425da54d6d
(cherry picked from commit 43cd3ceb7e8bc40a71668e9d9443a7c7df18febe)
Adding a reference driver for the agent

This driver handles communication with the Ironic Python Agent's REST
API and controls the agent through the deploy and tear down process.
It utilizes the nodeless vendor driver passthru to communicate with
newly booted agents. Things not included yet are support for
Neutron, agent registration/discovery, and writing an image to the
drive before deploy is called.

The original source for this driver was on GitHub. For history,
check: https://github.com/rackerlabs/ironic-teeth-driver

Depends on:
https://review.openstack.org/#/c/81391/
https://review.openstack.org/#/c/81919/

Implements: blueprint agent-driver
Change-Id: Ic6ad8703304af3041c48e9ade32eccbffa78ec9c
(cherry picked from commit 33dd4d0acbd8f17cf39dff033785714798ab2289)
Drivers determine acceptable power states

The list of acceptable power states for a Node to be in when Nova is
calling deploy, update, and destroy were set globally.
This patch allows the deploy drivers to determine
which states are acceptable for each. I added a new validate
method to the DeployInterface class that can be overriden if
a driver determines it needs different settings (such as the agent
driver). The current function provides sane defaults and the
same behavior as before for any driver not overriding the function.

Change-Id: Iefec4396c323d9746bb0ee84b015765a4adbb476
Closes-Bug: 1306202
(cherry picked from commit a144b4499aab09c8b56cd8d757513f84d594d8d6)
Adding swift temp url support

This patch will allow properly configured Glance servers to return a temporary
URL for an object hosted on Swift. It will require Glance to use Swift
as its backend. A temporary URL will let the agent download an image from
Glance without requiring an auth_token, which gives access more than just
Glance. The easiest way to use it is to enable direct_url in Glance, but
you can set the appropriate config options to avoid needing to enable it.

We/I need to add a note in the docs about Swift being a possible dependency
for Ironic deploys using IPA, along with how to set the Temp URL key.

Swift perfomance concerns will be addressed in this blueprint:
https://blueprints.launchpad.net/ironic/+spec/improve-swift-agent-downloads

SecurityImpact
DocImpact

Implements: blueprint swift-temp-urls
Change-Id: I10e4784eee63e8edc9ba30a9c5004a08aa3a6d8e
(cherry picked from commit 327d32726dbc1d9a1ee97315a66210f76c8123f8)