Browse Source

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
changes/55/784955/3
Takashi Kajinami 4 months ago
parent
commit
ff7636d3f9
  1. 2
      manifests/profile/base/ceilometer/agent/notification.pp
  2. 2
      manifests/profile/base/ceilometer/agent/polling.pp
  3. 9
      spec/classes/tripleo_profile_base_ceilometer_agent_notification_spec.rb
  4. 7
      spec/classes/tripleo_profile_base_ceilometer_agent_polling_spec.rb
  5. 1
      spec/fixtures/hieradata/default.yaml

2
manifests/profile/base/ceilometer/agent/notification.pp

@ -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)

2
manifests/profile/base/ceilometer/agent/polling.pp

@ -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,

9
spec/classes/tripleo_profile_base_ceilometer_agent_notification_spec.rb

@ -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 => []

7
spec/classes/tripleo_profile_base_ceilometer_agent_polling_spec.rb

@ -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,

1
spec/fixtures/hieradata/default.yaml

@ -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:

Loading…
Cancel
Save