Implement the reboot command on the Ironic Driver

Closes-Bug: #1310137
Change-Id: I63266d73537573f132b4914d15a87a8ccfa732e6
Fix chassis bookmark link url

Fix the chassis bookmark link url and modify the validate_link() at
tests/api/base.py to enable it to validate bookmark links. The tests on
all the resources were also updated to check if the bookmark link was
generated correctly.

Closes-Bug: #1304564
Change-Id: I8383dd1d48569dadbbafb4587c89973f8440b396
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
Consider free disk space before downloading images into cache

This patch makes PXE driver ensure it has enough disk space
to actually download required images. If it does not, it tries
to make some space by starting cache clean up.

While it would be better to have this code in ImageCache itself,
by keeping it in PXE module we have the ability to clean up
both caches, not only current one, thus reclaiming more space.
We clean up instance image cache first, because:
1. It's probably larger
2. Instance images are not required for running instances,
   so they are more likely to be cleaned

In the follow-up patch I'll implement hints for clean_up()
call on how much space we need. Otherwise clean_up procedure
may think that nothing needs to be cleaned even though
we don't have enough space for new downloads.

This patch also adds ironic.common.images.download_size() helper
and makes master_dir attribute of ImageCache public.
One more side-effect on implementation is that values in pxe_info
dict are now tuples (as they are supposed to be), not lists.

Change-Id: I1e7294b6e7155d83e72cfd144abdca858cab0aae
Partial-Bug: #1316168
Merge "Fix chassis bookmark link url"
Merge "Consider free disk space before downloading images into cache"
Merge "Implement the reboot command on the Ironic Driver"
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"
Fix tests with new keystoneclient

A number of changes with keystoneclient breaks our tests. First, a
kwarg changed for cache.set(). It should be 'time' now, not 'timeout'.

Also: keystone middleware now looks for an 'expires' in the token.

Sample conf needed regenerated, also, due to changes.

Change-Id: I33c4f1bae5a3c89b47fd21f8db1b4a4d536ed369
Closes-bug: 1324655