ironic/ironic/drivers/modules
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
..
amt Implement new heartbeat for AgentDeploy 2016-07-20 18:24:01 +02:00
cimc Centralize config options - [cimc] 2016-06-16 16:45:51 -07:00
drac Fix docstring warnings 2016-07-12 15:44:10 -07:00
ilo Merge "Implement new heartbeat for AgentDeploy" 2016-08-01 17:56:41 +00:00
irmc Fix docstring warnings 2016-07-12 15:44:10 -07:00
msftocs Try to standardize retrieval of an Exception's description 2015-09-08 15:52:16 +00:00
network Add 'neutron' network interface 2016-07-13 13:38:56 +03:00
oneview Implement new heartbeat for AgentDeploy 2016-07-20 18:24:01 +02:00
ucs Centralize config options - [cisco_ucs] 2016-06-16 16:47:50 -07:00
__init__.py Remove copyright from empty files 2014-01-07 21:05:01 +08:00
agent.py Timing metrics for agent deploy classes 2016-08-02 12:30:46 -07:00
agent_base_vendor.py Pass agent metrics config via conductor 2016-08-02 17:56:43 +00:00
agent_client.py Centralize config options - [agent] 2016-07-28 16:19:46 -07:00
agent_config.template Add support for partition images in agent drivers 2016-03-21 16:12:08 +00:00
boot.ipxe Fall back to old boot.ipxe behaviour if inc command is not found 2015-12-01 11:15:56 +01:00
console_utils.py Remove unused code when failing to start console 2016-07-24 23:49:17 +09:00
deploy_utils.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
elilo_efi_pxe_config.template Ensure configdrive isn't mounted for ipxe/elilo 2015-03-25 16:34:50 +00:00
fake.py Fix fake.FakeBoot.prepare_ramdisk() signature 2016-07-15 16:36:37 +03:00
iboot.py Remove IBootOperationError exception 2016-07-08 14:32:42 +00:00
image_cache.py Centralize config options - [DEFAULT] 2016-07-15 14:05:09 -07:00
inspector.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
ipminative.py Centralize config options - [ipmi] 2016-06-27 10:23:09 -07:00
ipmitool.py Minor docstring and unittests fixes for IPMIConsole 2016-08-02 16:30:22 +00:00
ipxe_config.template ipxe: retry on failure 2016-04-19 10:20:36 -04:00
iscsi_deploy.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
master_grub_cfg.txt grub2 bootloader support for uefi boot mode 2015-07-29 03:18:41 +00:00
pxe.py Remove two DEPRECATED config options from [agent] 2016-04-21 10:09:01 -07:00
pxe_config.template Add a new boot section 'trusted_boot' for PXE 2015-06-26 11:50:57 +08:00
pxe_grub_config.template grub2 bootloader support for uefi boot mode 2015-07-29 03:18:41 +00:00
seamicro.py Following the hacking rule for string interpolation at logging 2016-07-18 09:42:57 +00:00
snmp.py Centralize config options - [snmp] 2016-06-30 20:54:04 -07:00
ssh.py Centralize config options - [ssh] 2016-06-30 20:54:04 -07:00
virtualbox.py Centralize config options - [virtualbox] 2016-06-30 20:54:04 -07:00
wol.py Validate all tcp/udp port numbers 2015-11-19 09:23:33 +08:00