Synced jsonutils from oslo-incubator

The sync includes change that makes sure we get unicode-only dicts from
jsonutils no matter which json module implementation is selected.

The latest commit in oslo-incubator:
- 0f4586c0076183c6356eec682c8a593648125abd

Change-Id: Ic815ca3df94c33edec9104172048b2cd94b92e3f
Closes-Bug: 1314129
Change NodeLocked status code to a client-side error

Currently, the NodeLocked exception's HTTP status code indicates a
server-side failure, resulting in WSME logging it as such, and this
is leading to random failures in our CI tests. While NodeLocked is
a valid issue which should (currently) be exposed to the client,
it is not a server-side error and does not warrant a 5xx status code.

This patch changes the HTTP status code for this exception to
409 CONFLICT, causing WSME to log it as a warning. This is not ideal,
but it resolves the immediate issue (random CI test failures).

A longer term solution is being drafted at:
https://review.openstack.org/94923

Change-Id: Ied9dcf9bbcb505177adc57d7d8fe06e4096ff488
Closes-Bug: #1321494
Merge "Synced jsonutils from oslo-incubator"
Merge "Change NodeLocked status code to a client-side error"
Set the correct target versions for the RPC methods

This patch sets the correct target versions for the RPC methods in
the RPC API. This is a first step towards being able to enable rolling
upgrades for Ironic.

Partial-Bug: #1317300
Change-Id: I67ce731731c38e48b4f3180a423cbc18a3728903
Remove 'node' parameter from the Power interface

The node parameter is redundant since the node object is an attribute
of the task object.

Partial-Bug: #1312632
Change-Id: I4baa8526768a250e0cf047f56322039157772376
Merge "Remove 'node' parameter from the Power interface"
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 37424badfb4231f729c09474f5d863007b430d99)
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 f7df4238d0e4440ccf8eb7eca17f03f3b96c4db1)
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 5f055e865aab4adf9c0e28b92133b59522525ef4)
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)