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.

SecurityImpact

Implements: blueprint swift-temp-urls
Change-Id: I10e4784eee63e8edc9ba30a9c5004a08aa3a6d8e
(cherry picked from commit 8ef39afc712909b4b0802efca6f892bf0640fab7)
Drivers may expose a top-level passthru API

This allows drivers to implement a vendor method which will be executed on a
random conductor upon any POST to
/drivers/<driver_name>/vendor_passthru/<method_name>, where <method_name> is
an arbitrary path segment which will be passed to the driver_vendor_passthru
method on the vendor interface.

Implements: blueprint nodeless-vendor-passthru
Change-Id: Ia0866e9ca59c8eba7e52eabeb8c88076c54ebbfc
(cherry picked from commit 48af67f953ba0ddadf5fdca99cb90999d382d8e6)
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 544dcb6d6b516bd066f52309dfdae0ddb58c6eba)
Add agent fields to virt driver

This change adds required fields for the agent driver to the
Ironic virt driver. It also makes the add/remove fields code a bit
more generic for use by multiple drivers.

Change-Id: I28064ed97179fdbded7278b3bd675160edf546d3
(cherry picked from commit 50a01ac09fb0d5b53a90a85ef0ce2a15fa7a19a2)
Version agent lookup payloads

Begin versioning agent 'lookup' payloads. This doesn't actually
introduce support for any versioned payloads, but rather treats
unversioned payloads as 'v0' and adds some code to make it easier to
add version specific handlers.

Change-Id: I064ee8ec9d12e11601f63d274becbe348a032b1c
(cherry picked from commit c687db0fd36d9a369b4c87f288cdb904a849db57)
Add version 1 of agent payload

This is the same as v0, but with a version key, and using
"inventory" rather than "hardware" as the top level key.

Related to https://review.openstack.org/#/c/86141/

Change-Id: Ib21704277c35c75a016eee07c5b9ae158b4a3263
(cherry picked from commit bc520ad9674815696f813fbbd4fd234dcb9800d1)
Add configdrive generation to Nova driver

This allows the nova driver to ask nova to create a configdrive for an
instance, base64 encoding it, and store it in the Ironic DB. Then the
agent will be able to download and decode the configdrive, then write it
to the disk. Configdrive allows Nova to set the root password, static
networking on an instance, and inject files.

Change-Id: I64f6ae7ff9403d99a9ff5d035a37d0ec5a3f74cf
(cherry picked from commit d1034e2a14ccc175c6e84152773ebbcf1be8f272)
Add lookup method to agent vendor mappings

Does exactly that.

Change-Id: If966b12724c2b14794341d88a12fdc3bd3744c65
(cherry picked from commit 012eb30a4b78482a3e5f6ead3fc571c732a1f84f)
Bring agent deploy driver up to date with virt

This uses the `image_source` and `configdrive` fields added here:
https://review.openstack.org/#/c/86192/

It also looks up image info from glance based on the image ID.
The boot device is properly set and the node is rebooted.

Also removes duplicate test that was broken by this change.

Change-Id: I2a4079d04bd6896b1b1a6bebec719925f145c7cc
(cherry picked from commit e8a85bd38172ee5ced9924482c7ec894d21b9dd1)