Browse Source

Merge "Remove deprecated keystone::auth options"

tags/9.0.0^0
Jenkins 3 years ago
parent
commit
7651c49cac

+ 3
- 106
manifests/keystone/auth.pp View File

@@ -51,46 +51,6 @@
51 51
 #   (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:9292')
52 52
 #   This url should *not* contain any trailing '/'.
53 53
 #
54
-# [*port*]
55
-#   (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
56
-#   Default port for endpoints. (Defaults to 9292)
57
-#   Setting this parameter overrides public_url, internal_url and admin_url parameters.
58
-#
59
-# [*public_protocol*]
60
-#   (optional) DEPRECATED: Use public_url instead.
61
-#   Protocol for public endpoint. (Defaults to 'http')
62
-#   Setting this parameter overrides public_url parameter.
63
-#
64
-# [*public_address*]
65
-#   (optional) DEPRECATED: Use public_url instead.
66
-#   Public address for endpoint. (Defaults to '127.0.0.1')
67
-#   Setting this parameter overrides public_url parameter.
68
-#
69
-# [*internal_protocol*]
70
-#   (optional) DEPRECATED: Use internal_url instead.
71
-#   Protocol for internal endpoint. (Defaults to 'http')
72
-#   Setting this parameter overrides internal_url parameter.
73
-#
74
-# [*internal_address*]
75
-#   (optional) DEPRECATED: Use internal_url instead.
76
-#   Internal address for endpoint. (Defaults to '127.0.0.1')
77
-#   Setting this parameter overrides internal_url parameter.
78
-#
79
-# [*admin_protocol*]
80
-#   (optional) DEPRECATED: Use admin_url instead.
81
-#   Protocol for admin endpoint. (Defaults to 'http')
82
-#   Setting this parameter overrides admin_url parameter.
83
-#
84
-# [*admin_address*]
85
-#   (optional) DEPRECATED: Use admin_url instead.
86
-#   Admin address for endpoint. (Defaults to '127.0.0.1')
87
-#   Setting this parameter overrides admin_url parameter.
88
-#
89
-# === Deprecation notes
90
-#
91
-# If any value is provided for public_protocol, public_address or port parameters,
92
-# public_url will be completely ignored. The same applies for internal and admin parameters.
93
-#
94 54
 # === Examples
95 55
 #
96 56
 #  class { 'glance::keystone::auth':
@@ -114,71 +74,8 @@ class glance::keystone::auth(
114 74
   $public_url          = 'http://127.0.0.1:9292',
115 75
   $admin_url           = 'http://127.0.0.1:9292',
116 76
   $internal_url        = 'http://127.0.0.1:9292',
117
-  # DEPRECATED PARAMETERS
118
-  $port                = undef,
119
-  $public_protocol     = undef,
120
-  $public_address      = undef,
121
-  $internal_protocol   = undef,
122
-  $internal_address    = undef,
123
-  $admin_protocol      = undef,
124
-  $admin_address       = undef,
125 77
 ) {
126 78
 
127
-  if $port {
128
-    warning('The port parameter is deprecated, use public_url, internal_url and admin_url instead.')
129
-  }
130
-
131
-  if $public_protocol {
132
-    warning('The public_protocol parameter is deprecated, use public_url instead.')
133
-  }
134
-
135
-  if $internal_protocol {
136
-    warning('The internal_protocol parameter is deprecated, use internal_url instead.')
137
-  }
138
-
139
-  if $admin_protocol {
140
-    warning('The admin_protocol parameter is deprecated, use admin_url instead.')
141
-  }
142
-
143
-  if $public_address {
144
-    warning('The public_address parameter is deprecated, use public_url instead.')
145
-  }
146
-
147
-  if $internal_address {
148
-    warning('The internal_address parameter is deprecated, use internal_url instead.')
149
-  }
150
-
151
-  if $admin_address {
152
-    warning('The admin_address parameter is deprecated, use admin_url instead.')
153
-  }
154
-
155
-  if ($public_protocol or $public_address or $port) {
156
-    $public_url_real = sprintf('%s://%s:%s',
157
-      pick($public_protocol, 'http'),
158
-      pick($public_address, '127.0.0.1'),
159
-      pick($port, '9292'))
160
-  } else {
161
-    $public_url_real = $public_url
162
-  }
163
-
164
-  if ($admin_protocol or $admin_address or $port) {
165
-    $admin_url_real = sprintf('%s://%s:%s',
166
-      pick($admin_protocol, 'http'),
167
-      pick($admin_address, '127.0.0.1'),
168
-      pick($port, '9292'))
169
-  } else {
170
-    $admin_url_real = $admin_url
171
-  }
172
-
173
-  if ($internal_protocol or $internal_address or $port) {
174
-    $internal_url_real = sprintf('%s://%s:%s',
175
-      pick($internal_protocol, 'http'),
176
-      pick($internal_address, '127.0.0.1'),
177
-      pick($port, '9292'))
178
-  } else {
179
-    $internal_url_real = $internal_url
180
-  }
181
-
182 79
   $real_service_name = pick($service_name, $auth_name)
183 80
 
184 81
   if $configure_endpoint {
@@ -197,9 +94,9 @@ class glance::keystone::auth(
197 94
     password            => $password,
198 95
     email               => $email,
199 96
     tenant              => $tenant,
200
-    public_url          => $public_url_real,
201
-    admin_url           => $admin_url_real,
202
-    internal_url        => $internal_url_real,
97
+    public_url          => $public_url,
98
+    admin_url           => $admin_url,
99
+    internal_url        => $internal_url,
203 100
   }
204 101
 
205 102
   if $configure_user_role {

+ 3
- 0
releasenotes/notes/remove_deprecated_keystone_auth_options-bec5bba5a8e22d16.yaml View File

@@ -0,0 +1,3 @@
1
+---
2
+other:
3
+  - Removed deprecated options for glance::keystone::auth class.

+ 0
- 25
spec/classes/glance_keystone_auth_spec.rb View File

@@ -77,31 +77,6 @@ describe 'glance::keystone::auth' do
77 77
       ) }
78 78
     end
79 79
 
80
-    describe 'with deprecated endpoints parameters' do
81
-
82
-      let :params do
83
-        {
84
-          :password          => 'pass',
85
-          :public_address    => '10.0.0.1',
86
-          :admin_address     => '10.0.0.2',
87
-          :internal_address  => '10.0.0.3',
88
-          :port              => '9393',
89
-          :region            => 'RegionTwo',
90
-          :public_protocol   => 'https',
91
-          :admin_protocol    => 'https',
92
-          :internal_protocol => 'https'
93
-        }
94
-      end
95
-
96
-      it { is_expected.to contain_keystone_endpoint('RegionTwo/Image Service::image').with(
97
-        :ensure       => 'present',
98
-        :public_url   => 'https://10.0.0.1:9393',
99
-        :admin_url    => 'https://10.0.0.2:9393',
100
-        :internal_url => 'https://10.0.0.3:9393'
101
-      )}
102
-
103
-    end
104
-
105 80
     describe 'when endpoint is not set' do
106 81
 
107 82
       let :params do

Loading…
Cancel
Save