As project and user names are only unique for each domain and some
Keystone settings may filter user listing, any user or project search by
name needs to include the associated domain.
This change fixes any search done by name of a project or user in the
openstack_user resource. It is
assumed that if no domain is specified and there are multiple elements
with the same name, the first search result is
chosen.
Closes-Bug: #1871144
Change-Id: I0ed3ffabab5f8b0959c3b2c50a3619f378e59c9e
Signed-off-by: Henrique Santos <hfigueiredosantos@tecnico.ulisboa.pt>
The breaking changes of 0.3.1 have been reverted in 0.3.2 and the
changes have been reintroduced in 1.0.0.
Change-Id: I3bb53ef37a0a505adf5c06bf501f3f100632e21d
With 0.3.1, fog-openstack renames much of its API, resulting in
errors such as:
openstack_domain[default] (openstack-identity::registration line 69) had
an error: NameError: uninitialized constant Fog::Identity::OpenStack
Let's stay below 0.3 for now.
Change-Id: Id3e9e6d8560ef5ffd9d28eedc0a2494722a2878f
(cherry picked from commit 0664bf2935)
The update of the fog-openstack ruby gem from 0.12.7 to 0.2.0 breaks
Chef recipes. The first call to cookbook-openstackclient from
cookbook-openstack-identity:recipes/registration.rb fails already with
something like (extract from a kitchen run of openstack-chef-repo):
ERROR: openstack_domain[default] (openstack-identity::registration line 69)
had an error: Fog::Identity::OpenStack::NotFound: Expected([200]) <=>
Actual(404 Not Found)
(http://127.0.0.1:35357/v3/v3/domains): The resource could not be found.
Change-Id: I4d30cb1770b6774b39bfd4e4c413f25816b405df
(cherry picked from commit 7ae001c6c4)
Unlike the rest of the library, openstack_user's grant_domain and
revoke_domain actions bypass the fog models and call directly into the
requests. It works, but it is inconsistent and confusing.
This patch uses user.grant_role instead of directly calling
connection.grant_domain_user_role. Likewise for revoke_domain.
This patch adds platform and version to the spec files. Without it,
every single test results in this warning:
WARNING: you must specify a 'platform' and 'version' to your ChefSpec Runner and/or Fauxhai constructor, in the future omitting these will become a hard error. A list of available platforms is available at https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
The new comments try to clarify the purpose of the ":grant_domain"
action of the openstack_user resource.
In contrast to what the name may suggest, the action does not grant a
domain (which is not possible). Instead, it grants a role to a user who
is already in a specific domain. The domain attribute is merely used to
identify the user.
For reasonably recent OpenStack releases, users are always created in a
domain (by default in the aptly named 'Default' domain). With this
patch, a new domain name attribute can be passed to the openstack_user's
:create action in order to create a user in a specific domain.
If the project tenant is given when creating the user account,
honor it by assigning that as the _default_ project tenant.
This is especially helpful when creating initial service accounts and
assigning them to the `service` project).