|
15 | 15 | # Defaults to ceilometer |
16 | 16 | # |
17 | 17 | # [*keystone_host*] |
18 | | -# (optional) Keystone's admin endpoint IP/Host. |
| 18 | +# (optional) DEPRECATED. Keystone's admin endpoint IP/Host. |
19 | 19 | # Defaults to '127.0.0.1' |
20 | 20 | # |
21 | 21 | # [*keystone_port*] |
22 | | -# (optional) Keystone's admin endpoint port. |
| 22 | +# (optional) DEPRECATED. Keystone's admin endpoint port. |
23 | 23 | # Defaults to 35357 |
24 | 24 | # |
25 | 25 | # [*keystone_auth_admin_prefix*] |
26 | | -# (optional) 'path' to the keystone admin endpoint. |
| 26 | +# (optional) DEPRECATED. 'path' to the keystone admin endpoint. |
27 | 27 | # Define to a path starting with a '/' and without trailing '/'. |
28 | 28 | # Eg.: '/keystone/admin' to match keystone::wsgi::apache default. |
29 | 29 | # Defaults to false (empty) |
30 | 30 | # |
31 | 31 | # [*keystone_protocol*] |
32 | | -# (optional) 'http' or 'https' |
| 32 | +# (optional) DEPRECATED. 'http' or 'https' |
33 | 33 | # Defaults to 'https'. |
34 | 34 | # |
35 | 35 | # [*keytone_user*] |
|
48 | 48 | # (optional) Public Identity API endpoint. |
49 | 49 | # Defaults to 'false'. |
50 | 50 | # |
| 51 | +# [*keystone_identity_uri*] |
| 52 | +# (optional) Complete admin Identity API endpoint. |
| 53 | +# Defaults to: false |
| 54 | +# |
51 | 55 | # [*host*] |
52 | 56 | # (optional) The ceilometer api bind address. |
53 | 57 | # Defaults to 0.0.0.0 |
|
64 | 68 | $manage_service = true, |
65 | 69 | $enabled = true, |
66 | 70 | $package_ensure = 'present', |
67 | | - $keystone_host = '127.0.0.1', |
68 | | - $keystone_port = '35357', |
69 | | - $keystone_auth_admin_prefix = false, |
70 | | - $keystone_protocol = 'http', |
71 | 71 | $keystone_user = 'ceilometer', |
72 | 72 | $keystone_tenant = 'services', |
73 | 73 | $keystone_password = false, |
74 | 74 | $keystone_auth_uri = false, |
| 75 | + $keystone_identity_uri = false, |
75 | 76 | $host = '0.0.0.0', |
76 | | - $port = '8777' |
| 77 | + $port = '8777', |
| 78 | + # DEPRECATED PARAMETERS |
| 79 | + $keystone_host = '127.0.0.1', |
| 80 | + $keystone_port = '35357', |
| 81 | + $keystone_auth_admin_prefix = false, |
| 82 | + $keystone_protocol = 'http', |
77 | 83 | ) { |
78 | 84 |
|
79 | 85 | include ceilometer::params |
|
112 | 118 | } |
113 | 119 |
|
114 | 120 | ceilometer_config { |
115 | | - 'keystone_authtoken/auth_host' : value => $keystone_host; |
116 | | - 'keystone_authtoken/auth_port' : value => $keystone_port; |
117 | | - 'keystone_authtoken/auth_protocol' : value => $keystone_protocol; |
118 | 121 | 'keystone_authtoken/admin_tenant_name' : value => $keystone_tenant; |
119 | 122 | 'keystone_authtoken/admin_user' : value => $keystone_user; |
120 | 123 | 'keystone_authtoken/admin_password' : value => $keystone_password, secret => true; |
121 | 124 | 'api/host' : value => $host; |
122 | 125 | 'api/port' : value => $port; |
123 | 126 | } |
124 | 127 |
|
125 | | - if $keystone_auth_admin_prefix { |
126 | | - validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$') |
127 | | - ceilometer_config { |
128 | | - 'keystone_authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix; |
| 128 | + # if both auth_uri and identity_uri are set we skip these deprecated settings entirely |
| 129 | + if !$keystone_auth_uri or !$keystone_identity_uri { |
| 130 | + |
| 131 | + if $keystone_auth_admin_prefix { |
| 132 | + validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$') |
| 133 | + warning('The keystone_auth_admin_prefix parameter is deprecated. Please use auth_uri and identity_uri instead.') |
| 134 | + ceilometer_config { |
| 135 | + 'keystone_authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix; |
| 136 | + } |
| 137 | + } else { |
| 138 | + ceilometer_config { |
| 139 | + 'keystone_authtoken/auth_admin_prefix': ensure => absent; |
| 140 | + } |
| 141 | + } |
| 142 | + |
| 143 | + if $keystone_host { |
| 144 | + warning('The keystone_host parameter is deprecated. Please use auth_uri and identity_uri instead.') |
| 145 | + ceilometer_config { |
| 146 | + 'keystone_authtoken/auth_host': value => $keystone_host; |
| 147 | + } |
| 148 | + } else { |
| 149 | + ceilometer_config { |
| 150 | + 'keystone_authtoken/auth_host': ensure => absent; |
| 151 | + } |
| 152 | + } |
| 153 | + |
| 154 | + if $keystone_port { |
| 155 | + warning('The keystone_port parameter is deprecated. Please use auth_uri and identity_uri instead.') |
| 156 | + ceilometer_config { |
| 157 | + 'keystone_authtoken/auth_port': value => $keystone_port; |
| 158 | + } |
| 159 | + } else { |
| 160 | + ceilometer_config { |
| 161 | + 'keystone_authtoken/auth_port': ensure => absent; |
| 162 | + } |
| 163 | + } |
| 164 | + |
| 165 | + if $keystone_protocol { |
| 166 | + warning('The keystone_protocol parameter is deprecated. Please use auth_uri and identity_uri instead.') |
| 167 | + ceilometer_config { |
| 168 | + 'keystone_authtoken/auth_protocol': value => $keystone_protocol; |
| 169 | + } |
| 170 | + } else { |
| 171 | + ceilometer_config { |
| 172 | + 'keystone_authtoken/auth_protocol': ensure => absent; |
| 173 | + } |
129 | 174 | } |
130 | 175 | } else { |
131 | 176 | ceilometer_config { |
132 | | - 'keystone_authtoken/auth_admin_prefix': ensure => absent; |
| 177 | + 'keystone_authtoken/auth_host' : ensure => absent; |
| 178 | + 'keystone_authtoken/auth_port' : ensure => absent; |
| 179 | + 'keystone_authtoken/auth_protocol' : ensure => absent; |
| 180 | + 'keystone_authtoken/auth_admin_prefix' : ensure => absent; |
133 | 181 | } |
134 | 182 | } |
135 | 183 |
|
136 | 184 | if $keystone_auth_uri { |
| 185 | + $keystone_auth_uri_real = $keystone_auth_uri |
| 186 | + } elsif $keystone_host and $keystone_protocol { |
| 187 | + $keystone_auth_uri_real = "${keystone_protocol}://${keystone_host}:5000/" |
| 188 | + } |
| 189 | + |
| 190 | + ceilometer_config { |
| 191 | + 'keystone_authtoken/auth_uri': value => $keystone_auth_uri_real; |
| 192 | + } |
| 193 | + |
| 194 | + if $keystone_identity_uri { |
137 | 195 | ceilometer_config { |
138 | | - 'keystone_authtoken/auth_uri': value => $keystone_auth_uri; |
| 196 | + 'keystone_authtoken/identity_uri': value => $keystone_identity_uri; |
139 | 197 | } |
140 | 198 | } else { |
141 | 199 | ceilometer_config { |
142 | | - 'keystone_authtoken/auth_uri': value => "${keystone_protocol}://${keystone_host}:5000/"; |
| 200 | + 'keystone_authtoken/identity_uri': ensure => absent; |
143 | 201 | } |
144 | 202 | } |
145 | 203 |
|
|
0 commit comments