ironic/ironic/drivers
Pavlo Shchelokovskyy f9ea26ebf3 Migrate to using keystoneauth Sessions
We currently construct Keystone client objects directly, which
is no longer the preferred way.  Instead, we should be using Sessions
which allows use of different auth plugins.  This change attempts to
migrate our Keystone usage to this model.

Additionally, we currently rely on the imported keystonemiddleware
auth_token's configuration for all of the Keystone credentials used
by the Ironic service user.  This is bad, as that config is internal
to that library and may change at any time.  Also, the service user
may be using different credentials than the token validator.

This refactors the keystone module to use Sessions.
It attempts to provide some backward compat for users
who have not yet updated their config,
by falling back to the authtoken config section when required.

Operators impact:

- Authentification parameters for each service now should specified in
  the corresponding config section for this service ([glance], [neutron]
  [swift], [inspector]).
  This includes providing both Keystone session-related options
  (timeout, SSL-related ones) and authentification options
  (`auth_type`, `auth_url` and proper options for the auth plugin).

- New config section `service_catalog` for Ironic service user
  credentials, used to resolve Ironic API URL from Keystone catalog.

- If loading from the service config section fails, an attempt is made
  to use respective options from [keystone_authtoken] section as a
  fall-back for backward compatibility.

Implementation details:

- using keystoneauth1 library instead of keystoneclient

- For each service the keystone session is created only once and is
  reused further. This lowers the number of authentification requests
  made to Keystone but implies that only auth plugins that can
  re-authentificate themselves can be used (so no *Token plugins).

This patch does not update the DevStack plugin, in order to test
backwards compatibility with old config options.
DevStack plugin will be modified in a subsequent patch.

Change-Id: I166eebefc1e1335a1a7b632149cf6441512e9d5e
Closes-Bug: #1422632
Related-Bug: #1418341
Related-Bug: #1494776
Co-Authored-By: Adam Gandelman <adamg@ubuntu.com>
2016-08-03 11:24:21 -07:00
..
modules Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
__init__.py Remove copyright from empty files 2014-01-07 21:05:01 +08:00
agent.py IPMITool: add IPMISocatConsole and IPMIConsole class 2016-07-25 16:42:31 +09:00
base.py Centralize config options - [DEFAULT] 2016-07-15 14:05:09 -07:00
drac.py Remove support for the old ramdisk (DIB deploy-ironic element) 2016-06-09 13:43:21 +02:00
fake.py IPMITool: add IPMISocatConsole and IPMIConsole class 2016-07-25 16:42:31 +09:00
ilo.py Adds RAID interface for 'iscsi_ilo' 2016-05-09 08:26:57 +00:00
irmc.py Add hardware inspection module for iRMC driver 2016-02-12 11:28:38 +09:00
oneview.py Move FakeOneViewDriver to the fake.py module 2015-10-12 18:46:34 +01:00
pxe.py IPMITool: add IPMISocatConsole and IPMIConsole class 2016-07-25 16:42:31 +09:00
raid_config_schema.json RAID interface to support JBOD volumes 2016-05-04 14:28:48 +00:00
utils.py Move _normalize_mac to driver utils 2016-03-17 18:17:26 +02:00