Browse Source

Deprecate auth_uri option

Option "auth_uri" from group "keystone_authtoken" is deprecated[1].
Use option "www_authenticate_uri" from group "keystone_authtoken".

[1]: https://review.openstack.org/#/c/508522/

Change-Id: I4c82a63baabd6b9304b302c97cd751a0103d8316
Closes-Bug: #1759098
tags/13.0.0
ZhongShengping 1 year ago
parent
commit
73d07c00f4

+ 0
- 1
.zuul.yaml View File

@@ -2,5 +2,4 @@
2 2
     templates:
3 3
       - puppet-openstack-check-jobs
4 4
       - puppet-openstack-module-unit-jobs
5
-      - puppet-openstack-integration-jobs-all
6 5
       - puppet-openstack-beaker-jobs

+ 16
- 3
manifests/resource/authtoken.pp View File

@@ -75,7 +75,7 @@
75 75
 #  (Optional) Authentication type to load
76 76
 #  Defaults to $::os_service_default
77 77
 #
78
-# [*auth_uri*]
78
+# [*www_authenticate_uri*]
79 79
 #  (Optional) Complete public Identity API endpoint.
80 80
 #  Defaults to $::os_service_default.
81 81
 #
@@ -209,6 +209,12 @@
209 209
 #  (Optional) Whether to install the python-memcache package.
210 210
 #  Defaults to false.
211 211
 #
212
+# DEPRECATED PARAMETERS
213
+#
214
+# [*auth_uri*]
215
+#   (Optional) Complete public Identity API endpoint.
216
+#   Defaults to undef
217
+#
212 218
 define keystone::resource::authtoken(
213 219
   $username,
214 220
   $password,
@@ -219,7 +225,7 @@ define keystone::resource::authtoken(
219 225
   $insecure                       = $::os_service_default,
220 226
   $auth_section                   = $::os_service_default,
221 227
   $auth_type                      = $::os_service_default,
222
-  $auth_uri                       = $::os_service_default,
228
+  $www_authenticate_uri           = $::os_service_default,
223 229
   $auth_version                   = $::os_service_default,
224 230
   $cache                          = $::os_service_default,
225 231
   $cafile                         = $::os_service_default,
@@ -244,10 +250,17 @@ define keystone::resource::authtoken(
244 250
   $region_name                    = $::os_service_default,
245 251
   $token_cache_time               = $::os_service_default,
246 252
   $manage_memcache_package        = false,
253
+  # DEPRECATED PARAMETERS
254
+  $auth_uri                       = undef,
247 255
 ) {
248 256
 
249 257
   include ::keystone::deps
250 258
 
259
+  if $auth_uri {
260
+    warning('The auth_uri parameter is deprecated. Please use www_authenticate_uri instead.')
261
+  }
262
+  $www_authenticate_uri_real = pick($auth_uri, $www_authenticate_uri)
263
+
251 264
   if !is_service_default($check_revocations_for_cached) {
252 265
     validate_bool($check_revocations_for_cached)
253 266
   }
@@ -287,7 +300,7 @@ define keystone::resource::authtoken(
287 300
 
288 301
   $keystonemiddleware_options = {
289 302
     'keystone_authtoken/auth_section'                   => {'value' => $auth_section},
290
-    'keystone_authtoken/auth_uri'                       => {'value' => $auth_uri},
303
+    'keystone_authtoken/www_authenticate_uri'           => {'value' => $www_authenticate_uri_real},
291 304
     'keystone_authtoken/auth_type'                      => {'value' => $auth_type},
292 305
     'keystone_authtoken/auth_version'                   => {'value' => $auth_version},
293 306
     'keystone_authtoken/cache'                          => {'value' => $cache},

+ 4
- 0
releasenotes/notes/deprecate_auth_uri_parameter-943eeba4dc64dddc.yaml View File

@@ -0,0 +1,4 @@
1
+---
2
+deprecations:
3
+  - auth_uri is deprecated and will be removed in a future release.
4
+    Please use www_authenticate_uri instead.

+ 3
- 3
spec/defines/keystone_resource_authtoken_spec.rb View File

@@ -23,7 +23,7 @@ describe 'keystone::resource::authtoken' do
23 23
         is_expected.to contain_keystone_config('keystone_authtoken/insecure').with_value('<SERVICE DEFAULT>')
24 24
         is_expected.to contain_keystone_config('keystone_authtoken/auth_section').with_value('<SERVICE DEFAULT>')
25 25
         is_expected.to contain_keystone_config('keystone_authtoken/auth_type').with_value('<SERVICE DEFAULT>')
26
-        is_expected.to contain_keystone_config('keystone_authtoken/auth_uri').with_value('<SERVICE DEFAULT>')
26
+        is_expected.to contain_keystone_config('keystone_authtoken/www_authenticate_uri').with_value('<SERVICE DEFAULT>')
27 27
         is_expected.to contain_keystone_config('keystone_authtoken/auth_version').with_value('<SERVICE DEFAULT>')
28 28
         is_expected.to contain_keystone_config('keystone_authtoken/cache').with_value('<SERVICE DEFAULT>')
29 29
         is_expected.to contain_keystone_config('keystone_authtoken/cafile').with_value('<SERVICE DEFAULT>')
@@ -62,7 +62,7 @@ describe 'keystone::resource::authtoken' do
62 62
           :insecure                     =>  true,
63 63
           :auth_section                 => 'some_section',
64 64
           :auth_type                    => 'password',
65
-          :auth_uri                     => 'http://127.1.1.127:5000/',
65
+          :www_authenticate_uri         => 'http://127.1.1.127:5000/',
66 66
           :auth_version                 => '3',
67 67
           :cache                        => 'somevalue',
68 68
           :cafile                       => 'cafile.pem',
@@ -88,7 +88,7 @@ describe 'keystone::resource::authtoken' do
88 88
         is_expected.to contain_keystone_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name])
89 89
         is_expected.to contain_keystone_config('keystone_authtoken/insecure').with_value(params[:insecure])
90 90
         is_expected.to contain_keystone_config('keystone_authtoken/auth_section').with_value(params[:auth_section])
91
-        is_expected.to contain_keystone_config('keystone_authtoken/auth_uri').with_value(params[:auth_uri])
91
+        is_expected.to contain_keystone_config('keystone_authtoken/www_authenticate_uri').with_value(params[:www_authenticate_uri])
92 92
         is_expected.to contain_keystone_config('keystone_authtoken/auth_version').with_value(params[:auth_version])
93 93
         is_expected.to contain_keystone_config('keystone_authtoken/cache').with_value(params[:cache])
94 94
         is_expected.to contain_keystone_config('keystone_authtoken/check_revocations_for_cached').with_value(params[:check_revocations_for_cached])

Loading…
Cancel
Save