Replace deprecated ceilometer::agent::auth

... with the new ceilometer::agent::service_credentials class.

Depends-on: https://review.opendev.org/775730
Depends-on: https://review.opendev.org/784952
Change-Id: I045a7ac2a36507c201b9a0745cc57587282f8596
This commit is contained in:
Takashi Kajinami 2021-04-06 22:18:58 +09:00
parent 4aa4383ed0
commit ff7636d3f9
5 changed files with 10 additions and 11 deletions

View File

@ -69,7 +69,7 @@ class tripleo::profile::base::ceilometer::agent::notification (
include tripleo::profile::base::ceilometer::upgrade
if $step >= 4 {
include ceilometer::agent::auth
include ceilometer::agent::service_credentials
if $pipeline_publishers {
$other_publishers = Array($pipeline_publishers, true)

View File

@ -67,7 +67,7 @@ class tripleo::profile::base::ceilometer::agent::polling (
}
if $step >= 4 {
include ceilometer::agent::auth
include ceilometer::agent::service_credentials
class { 'ceilometer::agent::polling':
central_namespace => $central_namespace,
compute_namespace => $compute_namespace,

View File

@ -29,15 +29,13 @@ describe 'tripleo::profile::base::ceilometer::agent::notification' do
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceilometer::agent::notification')
is_expected.to contain_class('tripleo::profile::base::ceilometer::upgrade')
is_expected.to_not contain_class('ceilometer::agent::service_credentials')
is_expected.to_not contain_class('ceilometer::agent::notification')
end
end
context 'with step 4 and notifier configured' do
let(:pre_condition) do
"class { 'ceilometer::agent::auth': auth_password => 'password' }"
end
let(:params) do
{ :step => 4,
:notifier_enabled => false,
@ -47,6 +45,9 @@ describe 'tripleo::profile::base::ceilometer::agent::notification' do
end
it 'should trigger complete configuration' do
is_expected.to contain_class('tripleo::profile::base::ceilometer::agent::notification')
is_expected.to contain_class('tripleo::profile::base::ceilometer::upgrade')
is_expected.to contain_class('ceilometer::agent::service_credentials')
is_expected.to contain_class('ceilometer::agent::notification').with(
:event_pipeline_publishers => ["notifier://127.0.0.1:5666/?driver=amqp&topic=ceilometer/event.sample"],
:pipeline_publishers => []

View File

@ -31,16 +31,12 @@ describe 'tripleo::profile::base::ceilometer::agent::polling' do
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceilometer::agent::polling')
is_expected.to_not contain_class('ceilometer::agent::service_credentials')
is_expected.to_not contain_class('ceilometer::agent::polling')
end
end
context 'with step 4 on polling agent' do
let(:pre_condition) do
"class { 'ceilometer::agent::auth': auth_password => 'password' }"
end
let(:params) { {
:step => 4,
:ceilometer_redis_password => 'password',
@ -49,6 +45,7 @@ describe 'tripleo::profile::base::ceilometer::agent::polling' do
} }
it 'should trigger complete configuration' do
is_expected.to contain_class('ceilometer::agent::service_credentials')
is_expected.to contain_class('ceilometer::agent::polling').with(
:central_namespace => true,
:compute_namespace => false,

View File

@ -17,6 +17,7 @@ barbican::db::mysql::password: 'password'
barbican::keystone::authtoken::password: 'password'
# ceilometer related items
ceilometer::rabbit_password: 'password'
ceilometer::agent::service_credentials::password: 'password'
# ceph related items
# NOTE(gfidente): we want to use keystone v3 API for RGW so the following are
# needed to comply with the if condition: