# [*keystone_password*] password to authenticate with
# Mandatory.
#
+# [*host*]
+# (optional) The ceilometer api bind address
+# Defaults to 0.0.0.0
+#
+# [*port*]
+# (optional) The ceilometer api port
+# Defaults to 8777
+#
+
class ceilometer::api (
$enabled = true,
$keystone_host = '127.0.0.1',
$keystone_tenant = 'services',
$keystone_password = false,
$keystone_auth_uri = false,
+ $host = '0.0.0.0',
+ $port = '8777'
) {
include ceilometer::params
'keystone_authtoken/admin_tenant_name' : value => $keystone_tenant;
'keystone_authtoken/admin_user' : value => $keystone_user;
'keystone_authtoken/admin_password' : value => $keystone_password;
+ 'api/host' : value => $host;
+ 'api/port' : value => $port;
}
if $keystone_auth_admin_prefix {
:keystone_protocol => 'http',
:keystone_user => 'ceilometer',
:keystone_password => 'ceilometer-passw0rd',
- :keystone_tenant => 'services'
+ :keystone_tenant => 'services',
+ :host => '0.0.0.0',
+ :port => '8777'
}
end
should contain_ceilometer_config('keystone_authtoken/admin_password').with_value( params[:keystone_password] )
should contain_ceilometer_config('keystone_authtoken/auth_admin_prefix').with_ensure('absent')
should contain_ceilometer_config('keystone_authtoken/auth_uri').with_value( params[:keystone_protocol] + "://" + params[:keystone_host] + ":5000/" )
+ should contain_ceilometer_config('api/host').with_value( params[:host] )
+ should contain_ceilometer_config('api/port').with_value( params[:port] )
end
context 'when specifying keystone_auth_admin_prefix' do