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 4262ad3c71454fd700dce3cd7a6d2e2211407294)
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 4c914dd87a5bb6095842cc71d6a8b8897d5cc306)
(cherry picked from commit 983e27b7df5effa06921027cd66ec0668002b69f)
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 15e70d4c6344fcdeab9c4f4d977b60e0e84c67d8)
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 e41ec15f915bd7650afc251ddc0da8cd38743ec4)
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 a490134f8efd97c6e81fd7b59fc0111c3dffb729)
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)
Support for v2 agent payloads

The agent is now sending more data, which changed the schema. This
supports the new interfaces layout. Support for the rest of the
payload (CPU/Mem/etc) will come in a separate patch, along with
refactoring v0-v2.

Change-Id: I5da8310257fb720fa9fc67fb030fe0c57718a8f1
(cherry picked from commit 03c6dece99fa9e76330fc9f0e472a8fd4b7de20e)