Commit Graph

35 Commits

Author SHA1 Message Date
OpenDev Sysadmins 0a61703d14 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:30:14 +00:00
Roger Luethi 876cb832c2 Pin fog-openstack to 0.3.4
With 0.3.5, fog-openstack changes the way it handles versioned identity
endpoints, resulting in errors such as:

  Excon::Error::NotFound: openstack_domain[default]
  (openstack-identity::registration line 69) had an error:
  Excon::Error::NotFound: Expected([200, 201]) <=> Actual(404 Not Found)
  excon.error.response
    :body          => "{\"error\": {\"message\":
    \"(http://127.0.0.1:35357/v3/auth/tokens/v3/auth/tokens): The resource
    could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}"
    :cookies       => [
    ]
    :headers       => {
      "Content-Length"         => "149"
      "Content-Type"           => "application/json"
      "Date"                   => "Fri, 28 Sep 2018 06:27:48 GMT"
      "Server"                 => "Apache"
      "Vary"                   => "X-Auth-Token"
      "X-Distribution"         => "Ubuntu"
      "x-openstack-request-id" => "req-bc3aed4d-a4f2-4224-8aef-c675387d3a27"
    }
    :host          => "127.0.0.1"
    :local_address => "127.0.0.1"
    :local_port    => 42372
    :path          => "/v3/auth/tokens/v3/auth/tokens"
    :port          => 35357
    :reason_phrase => "Not Found"
    :remote_ip     => "127.0.0.1"
    :status        => 404
    :status_line   => "HTTP/1.1 404 Not Found\r\n"

Change-Id: Icfb0cd289ed62e7433cc1ee2341a70d649fc6aa0
2018-09-28 08:28:19 +02:00
Samuel Cassiba be26bae8c2
Pin fog-openstack to 0.3
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
2018-09-21 09:30:01 +00:00
Roger Luethi 0664bf2935 Pin fog-openstack to < 0.3.0
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
2018-09-19 08:53:28 +02:00
Samuel Cassiba 55712349a8 bump fog-openstack to fixed version which contains deprecation messages
This reverts commit 6ff248d681.

Change-Id: I83fb8960e9a651ebc800fab3f3cc33cc7b2635ae
2018-09-10 08:12:01 +00:00
Samuel Cassiba 92a940582c Revert "bump fog-openstack to fixed version which contains deprecation messages"
This reverts commit e199c3cedf.

Change-Id: I01aab5ffb777e0d98b9fb1397588e9abe54ded17
2018-09-04 17:29:18 +00:00
Jan Klare e199c3cedf bump fog-openstack to fixed version which contains deprecation messages
Change-Id: Iee7025b56ab1f3a48a5828743ead080ac401605c
2018-09-04 09:50:53 +00:00
Zuul f7b266f057 Merge "Pin fog-openstack library to avoid breakage" into stable/pike 2018-09-01 17:30:55 +00:00
Samuel Cassiba c34d45c976 Migrate Zuul jobs to openstack/openstack-chef
Change-Id: I6f1d9fb52f7d58d771d05a7f1f422d1065872858
2018-09-01 00:23:29 -07:00
Roger Luethi 5701f1f4cb Pin fog-openstack library to avoid breakage
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)
2018-08-31 10:05:00 +02:00
Jan Klare cf1bf525a5
Merge pull request #8 from scassiba/chef13_fixups
fix more resource collisions
2018-02-20 13:46:22 +01:00
Samuel Cassiba 15c451bc12 fix more resource collisions 2018-02-16 12:53:20 -08:00
Jan Klare 332f73217b
Merge pull request #7 from scassiba/master
Fixups for Chef 13+ for Pike
2018-02-12 17:12:06 +01:00
Samuel Cassiba 50b07b156a Aggressively undeprecate legitimate method calls 2018-02-12 08:04:51 -08:00
Samuel Cassiba dea8e2d18e Fix endpoint interface handling 2018-02-12 07:41:50 -08:00
Samuel Cassiba a48eb7cca2 Refer to property_name as new_resource.property_name
In Chef 14, the short form of property_name is removed, in favor of
new_resource.property_name.[0]

[0] https://docs.chef.io/deprecations_namespace_collisions.html
2018-02-12 07:41:50 -08:00
Samuel Cassiba 0b343d3c1b Fix metadata and LICENSE for foodcritic 2018-02-12 07:41:50 -08:00
Jan Klare 1df4fb87ba
update travis ci config with newes chefdk and adapt to cookstyle
* this is a preparation step for fully updation to chef13 (see also PR #7 for more updates)
2018-02-12 13:13:40 +01:00
Jan Klare 6472457e51
version bump to align with upstream 2017-11-23 15:49:28 +01:00
Jan Klare 00db69eaa9
Merge pull request #4 from ideaship/grant_domain_04
Grant domain
2017-11-13 23:22:41 +11:00
Roger Luethi 049eb35d46 Use user model for grant_domain, revoke_domain
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.
2017-11-10 17:03:03 +01:00
Roger Luethi ae02bdc632 Remove superfluous arguments for grant_domain, revoke_domain
The project_name argument is ignored by openstack_user's grant_domain
and revoke_domain actions. This patch removes them from the test recipe.
2017-11-10 17:03:03 +01:00
Roger Luethi 15781eac4e Add platform, version to spec files
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
2017-11-10 17:03:00 +01:00
Roger Luethi 97239e41a9 Add comments to openstack_user.rb
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.
2017-11-02 15:28:09 +01:00
Roger Luethi bfafac1d99 Allow user creation in domain other than default
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.
2017-11-02 15:28:09 +01:00
Jan Klare 44a257fd4b Merge pull request #3 from howardabrams/master
Specify the default tenant during user create
2017-04-12 11:02:07 +02:00
Howard Abrams 03fbe7b7a3 Specify the default tenant during user create
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).
2017-04-11 14:38:58 -07:00
Jan Klare 57e59b64e4 Merge pull request #2 from cloudbau/fix_grant_user_domain_role
Fixed function grant_user_domain_role
2016-09-30 12:17:57 +02:00
Christoph Albers d2b5bf7c37 Fixed function grant_user_domain_role
- method is from top level class (not domain itself)
- fixed specs
2016-09-30 12:08:13 +02:00
Jan Klare a65b0a3951 Merge pull request #1 from cloudbau/fix_openstack_base_lib
minor fix for openstack_base lib since new_resource was used in wrong
2016-09-26 17:51:28 +02:00
Jan Klare e22f838e0f minor fix for openstack_base lib since new_resource was used in wrong
context
2016-09-26 17:35:43 +02:00
Jan Klare 7daa8f458b added chef-client dependency 2016-08-30 10:15:03 +02:00
Jan Klare f7dd6cbc63 fixed README formatting 2016-08-30 10:08:42 +02:00
Jan Klare 12b5e233c2 added .travis.yml for automated testing 2016-08-30 09:59:56 +02:00
Jan Klare e86f258f5a initial commit
* working Rakefile to run lint, style and unit tests
* providers for domain, endpoint, project, role, service and user
* some initial README info
2016-08-30 09:44:21 +02:00