puppet-keystone/spec/unit/provider/keystone
Rich Megginson a054c503f3 support for keystone v3 api - v3 domain utility code
This patch implements these parts of the blueprint:

1) Adds some utility code for domain handling.  Puppet code may need
to specify resource titles as "name::domain" e.g. "admin::admin_domain".
The function split_domain is used to split a name in this format into
its ['name', 'domain'] components as an array.
Usually providers will not need to use this, they will use the
name_and_domain method in the keystone.rb provider.  This is resource
aware and will try many different ways to get a domain to use for
the provider:  resource[:domain], then the domain part of
'name::domain' name/title value.
If keystone.conf is available, it will use [identity]
default_domain_id as the default domain id, and look up the domain
name using the 'domain list' operation to create a mapping.
If all else fails, the domain name will be 'Default' which is the
"default" default domain name used by Keystone.

2) Adds the method domain_name_from_id - the providers and other code
will need to map from the domain id to the name, and this method
provides that mapping.

Implements: blueprint api-v3-support

Change-Id: Ifb8171b78904257f8112e1485d5255f0d0f5aca8
Depends-On: Icafc4cb8ed000fd9d3ed6ffde2afe1a1250d90af
2015-07-08 15:50:14 -06:00
..
util_spec.rb support for keystone v3 api - v3 domain utility code 2015-07-08 15:50:14 -06:00