Do not use __builtin__ in python3

__builtin__ does not exist in Python 3, use
six.moves.builtins instead.

Change-Id: I79b61b5ab67f491ce88015f799ff7d66c9eeb7ee
closes-bug: #1290234
Process public API list as regular expressions

In order to allow flexible patterns for public API specification
and to speed up the process of checking whether some request is
performed against the public API, it's reasonable to interpret the
list of public endpoints as regular expressions.

This patch changes the logic of checking whether a request requires
authorisation from searching the endpoint in the set to checking the
endpoint against a list of regular expressions.

Closes-bug: #1251880
Change-Id: I638ca0e20fa7e44fbeeae0d1e4c2f4188fb597a5
Conductor de-registers on shutdown

Conductor service should de-register itself upon shutdown.
This will cause RPC requests to immediately stop routing to it
rather than there being an unnecessary period of malfunction
before the next heartbeat cycle.

A new unit test (test_stop_unregisters_conductor) is added to
validate the de-registration of the conductor. Test hostname
values are coalesced into a single variable for consistency.

Co-Authored-By: David Shrewsbury <shrewsbury.dave@gmail.com>

Change-Id: I1feea2c0165cde36f2abb95c3fa3484c73dfd81c
Better instance-not-found handling within IronicDriver

Improve the handling of failed spawns and multiple deletes within the
IronicDriver.

Change-Id: I284f4669ba14db7bb33b5a53512b6a3822ad170c
Permit passing SSH keys into the Ironic API

SSH keys are equivalent to passwords for the ssh driver, and having to
special case deployment metadata to push them out of band to a file is
awkward. This patch adds the ability to pass the key in directly which
is much easier (in some environments).

Change-Id: I4421c80cb3dc0c8aee614c684d113a7ab6db6779
Fix 'spacing' parameters for periodic tasks

conductor.manager module contains 'spacing' parameters for periodic
tasks, they do not work because manager module imported before
parsing config options.
There is not such problem in Nova which uses create() method in class
derived from common Service for lazy loading manager module.
Because this derived class not needed for Ironic simple load_manager
function added to common.service.

Partial-Bug: #1279774
Change-Id: Ib31024c8eaf75d38de09983459d86125847cdf30
Fix traceback hook for avoid duplicate traces

In WSME there is special 'debuginfo' response key for return 'Server'
errors with trace in debug mode. We need to remove trace from
'faultstring' for this case also.

Change-Id: Ide3a5c084dcedfa557e1d58eb189bbe0ffc80ca6
Change JsonEncodedType.impl to TEXT

All JSON fields in Ironic currently use the TEXT type, not VARCHAR.
However, the `impl` attribute on JSON types is set to VARCHAR.
This change sets `impl` to TEXT for consistency.

Change-Id: I9ba2fb21ef60ec4c4a8e0f7fe3af97aa3679cc22
Expose API for fetching a single driver

The API currently allows drivers to be listed, but not fetched
individually.  This patch allows drivers to be retrieved by name.
While the current implementation offers only a modest performance
advantage over simply listing all drivers, this is required by Pecan
to enable us to expose further routes beneath
/v1/drivers/<driver_name>/.

Closes-Bug: #1294869

Change-Id: Id1a0868c58abb6ab10c2e5ca65559c91795dba26
Fix help string for a glance option

The help for 'glance_api_servers' configuration option referred to
'nova'. This changes it to refer to 'ironic' instead.

Change-Id: I9aed3bc1b883b21d328ce7beebd6ed70e5d87ee6
Change set_console_mode() to use greenthreads

This method now uses a worker thread to set the console mode asynchronously
similarly to several other methods.

Followup patch to changes Ia707766855bd7ec47a5af05e119b126504ddc0b1 and
Ie03afd66d365e48c9dc3dc48f31e93a08e07e79f.

Co-Authored-By: Michael Davies <michael@the-davies.net>

Change-Id: I96d4214ba86f2b1d489b5120c379adfca28a0a7d
Partial-Bug: #1285507
Hide rescue interface from validate() output

No API exists today to start or stop "rescue" mode, and no
driver supports it. Therefor, the list of supported driver
interfaces returned by:
  GET /v1/nodes/XXX/validate
should not include "rescue".

Co-Authored-By: David Shrewsbury <shrewsbury.dave@gmail.com>

Change-Id: I2a43409087dfa747fdb6930481e5585324ceeb50
Related-bug: #1294288
Documentation for deploying DevStack /w Ironic

Adds a section to the developer quickstart doc explaining
how to deploy Ironic as part of devstack.

Change-Id: I26a6f8faa882bfaa94dd6eb26e6bef197f12b25c
Correct version.py and update current version string

Correct the version string in setup.cfg for Icehouse.

Make ironic/version.py use PBR instead of the stale code that was there.

Make ironic/common/config.py properly set the version string so that
all CLI commands output it when "--version" is passed.

Remove openstack.common.version module which is no longer present in
oslo-incubator.

Closes-bug: #1294389

Change-Id: I9a7bfe5fc1b79934cf2467d6f8a6c16f41205dbf
Stop incorrectly returning rescue: supported

Rescue interface is not supported by ironic.drivers.modules.pxe, but all
the drivers which use the PXEDeploy interface were incorrectly mapping
it to their rescue interface as well, leading to the appearance that
these drivers supported rescue functionality.

This patch corrects this by removing the incorrect driver interface
mapping, and deleting the unused stub class PXERescue.

Change-Id: Icaa5928f18d72fcb2d26baac2a18606e8c4366c6
Closes-bug: #1294288
Merge "Conductor de-registers on shutdown"
Merge "Fix help string for a glance option"
Merge "Documentation for deploying DevStack /w Ironic"
Merge "Better instance-not-found handling within IronicDriver"
Imported Translations from Transifex

Change-Id: I855a8490df894c85bf6a3010e111cbfd341dd952