# [*auth_cacert*]
# Certificate chain for SSL validation. Optional; Defaults to 'None'
#
+# [*auth_endpoint_type*]
+# Type of endpoint in Identity service catalog to use for
+# communication with OpenStack services.
+# Optional. Defaults to undef.
+#
class ceilometer::agent::auth (
$auth_password,
- $auth_url = 'http://localhost:5000/v2.0',
- $auth_region = 'RegionOne',
- $auth_user = 'ceilometer',
- $auth_tenant_name = 'services',
- $auth_tenant_id = '',
- $auth_cacert = undef,
+ $auth_url = 'http://localhost:5000/v2.0',
+ $auth_region = 'RegionOne',
+ $auth_user = 'ceilometer',
+ $auth_tenant_name = 'services',
+ $auth_tenant_id = '',
+ $auth_cacert = undef,
+ $auth_endpoint_type = undef,
) {
if ! $auth_cacert {
}
}
+ if $auth_endpoint_type {
+ ceilometer_config {
+ 'service_credentials/os_endpoint_type' : value => $auth_endpoint_type;
+ }
+ }
+
}
context 'when overriding parameters' do
before do
- params.merge!(:auth_cacert => '/tmp/dummy.pem')
+ params.merge!(
+ :auth_cacert => '/tmp/dummy.pem',
+ :auth_endpoint_type => 'internalURL',
+ )
end
it { is_expected.to contain_ceilometer_config('service_credentials/os_cacert').with_value(params[:auth_cacert]) }
+ it { is_expected.to contain_ceilometer_config('service_credentials/os_endpoint_type').with_value(params[:auth_endpoint_type]) }
end
end