Remove usage of Glance from PXE clean_up()

Save uuids of instance kernel and ramdisk from Glance into node driver_info
('pxe_kernel' and 'pxe_ramdisk'). Stored values used in PXE clean_up()
method.

Closes-Bug: #1300602
Change-Id: I59b3dbd4f66c59060e5b229eae00b80fdc4702e5
Merge "Remove usage of Glance from PXE clean_up()"
Fix missed stopping of conductor service

Stopping of services in tests was added in Change ID
I7502df5dec7c42fe1a20bebad8f9ad393572d17d, however, a couple of cases
were missed or were added after it landed.

Change-Id: I772369423eb36f13734c4873a25127e868ba94a2
Cherry pick oslo rpc HA fixes

Get 2 commits from oslo-rpc fixing HA failover:

* Ia148baa6e1ec632789ac3621c85173c2c16f3918 (fixed HA failover, Qpid part)
* I67923cb024bbd143edc8edccf35b9b400df31eb3 (fixed HA failover, RabbitMQ part)

Change-Id: I8353288560c0c6a9ebe1d143690609765e59df1a
Closes-Bug: #1261631
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 77f276e178054f72ef7880a0432389746d3656c1)
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 0af7ee05310ac4e3791e904bb402c4c9f0a1092f)
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 8df74f85b4d93994b4cedc4428f6a52630cf8d9d)
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 3723172c331e0e4b42a37b517d5798e03fd569ce)
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 72cdb3a24c78bd8025cabb2f04bd4faa988d4a50)
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 c4f80ea9a27faa953790dcde972a2a20b0b6aef0)
Add configdrive generation to Nova driver

This allows the nova driver to ask nova to create a configdrive for an
instance, compress it, 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 75ec1b5ab75be78447876349cd933030abe78fff)
Add lookup method to agent vendor mappings

Does exactly that.

Change-Id: If966b12724c2b14794341d88a12fdc3bd3744c65
(cherry picked from commit 97f49971d80268a2243e36102d0bc4556c91abb3)
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 810b5cd97c3c08bf02a106e7c4943c1a26348ab2)
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 dbf4201cdfc8edd049cc680ba04a7539bae3330d)