From 74fe1d927fce4ed1cfc01e866f0b481156bc3d54 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 8 Dec 2019 15:20:50 +0100 Subject: [PATCH] Convert all class usage to relative names Change-Id: I9c2d172c157e3874f95fc77f90017ff9cfeae94e --- README.md | 16 +++++++-------- examples/ceilometer_with_gnocchi.pp | 20 +++++++++---------- examples/site.pp | 20 +++++++++---------- manifests/agent/auth.pp | 2 +- manifests/agent/notification.pp | 4 ++-- manifests/agent/polling.pp | 4 ++-- manifests/config.pp | 6 +++--- manifests/db.pp | 4 ++-- manifests/db/mysql.pp | 4 ++-- manifests/db/postgresql.pp | 4 ++-- manifests/db/sync.pp | 4 ++-- manifests/expirer.pp | 2 +- manifests/init.pp | 4 ++-- manifests/keystone/auth.pp | 4 ++-- manifests/keystone/authtoken.pp | 2 +- manifests/logging.pp | 2 +- manifests/params.pp | 2 +- manifests/policy.pp | 4 ++-- .../acceptance/ceilometer_wsgi_apache_spec.rb | 12 +++++------ 19 files changed, 60 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 58da0824..1814295e 100644 --- a/README.md +++ b/README.md @@ -52,19 +52,19 @@ Setup To utilize the ceilometer module's functionality you will need to declare multiple resources. This is not an exhaustive list of all the components needed. We recommend that you consult and understand the [core openstack](https://docs.openstack.org) documentation to assist you in understanding the available deployment options. ```puppet -class { '::ceilometer': +class { 'ceilometer': telemetry_secret => 'secrete', default_transport_url => 'rabbit://ceilometer:an_even_bigger_secret@127.0.0.1:5672', } -class { '::ceilometer::keystone::auth': +class { 'ceilometer::keystone::auth': password => 'a_big_secret', } -class { '::ceilometer::collector': } -class { '::ceilometer::expirer': } -class { '::ceilometer::agent::polling': } -class { '::ceilometer::agent::notification': } -class { '::ceilometer::db': } -class { '::ceilometer::keystone::authtoken': +class { 'ceilometer::collector': } +class { 'ceilometer::expirer': } +class { 'ceilometer::agent::polling': } +class { 'ceilometer::agent::notification': } +class { 'ceilometer::db': } +class { 'ceilometer::keystone::authtoken': password => 'a_big_secret', auth_url => 'http://127.0.0.1:5000/', } diff --git a/examples/ceilometer_with_gnocchi.pp b/examples/ceilometer_with_gnocchi.pp index 36f8694f..e1c35315 100644 --- a/examples/ceilometer_with_gnocchi.pp +++ b/examples/ceilometer_with_gnocchi.pp @@ -1,27 +1,27 @@ -class { '::ceilometer': +class { 'ceilometer': telemetry_secret => 'secrete', default_transport_url => 'rabbit://ceilometer:an_even_bigger_secret@127.0.0.1:5672', } -class { '::ceilometer::db::mysql': +class { 'ceilometer::db::mysql': password => 'a_big_secret', } -class { '::ceilometer::db': +class { 'ceilometer::db': database_connection => 'mysql://ceilometer:a_big_secret@127.0.0.1/ceilometer?charset=utf8', } -class { '::ceilometer::keystone::auth': +class { 'ceilometer::keystone::auth': password => 'a_big_secret', } -class { '::ceilometer::expirer': } -class { '::ceilometer::agent::polling': } -class { '::ceilometer::agent::notification': } -class { '::ceilometer::keystone::authtoken': +class { 'ceilometer::expirer': } +class { 'ceilometer::agent::polling': } +class { 'ceilometer::agent::notification': } +class { 'ceilometer::keystone::authtoken': password => 'a_big_secret', } -class { '::ceilometer::collector': +class { 'ceilometer::collector': meter_dispatchers => ['gnocchi'], } -class { '::ceilometer::dispatcher::gnocchi': +class { 'ceilometer::dispatcher::gnocchi': filter_service_activity => false, filter_project => 'gnocchi_swift', url => 'https://gnocchi:8041', diff --git a/examples/site.pp b/examples/site.pp index 7cd64387..746e5cdd 100644 --- a/examples/site.pp +++ b/examples/site.pp @@ -4,38 +4,38 @@ node default { } # First, install a mysql server - class { '::mysql::server': } + class { 'mysql::server': } # And create the database - class { '::ceilometer::db::mysql': + class { 'ceilometer::db::mysql': password => 'ceilometer', } # Add the base ceilometer class & parameters # This class is required by ceilometer agents & api classes # The telemetry_secret parameter is mandatory - class { '::ceilometer': + class { 'ceilometer': telemetry_secret => 'darksecret' } # Configure the ceilometer database # Only needed if ceilometer::agent::polling or ceilometer::api are declared - class { '::ceilometer::db': + class { 'ceilometer::db': } # Configure ceilometer database with mongodb - # class { '::ceilometer::db': + # class { 'ceilometer::db': # database_connection => 'mongodb://localhost:27017/ceilometer', # require => Class['mongodb'], # } # Configure keystonemiddleware for ceilometer - class { '::ceilometer::keystone::authtoken': + class { 'ceilometer::keystone::authtoken': password => 'tralalayouyou' } # Set common auth parameters used by all agents (compute/central) - class { '::ceilometer::agent::auth': + class { 'ceilometer::agent::auth': auth_url => 'http://localhost:5000/v3', auth_password => 'tralalerotralala' } @@ -58,17 +58,17 @@ node default { # ipmi_namespace => true # } # As default use central and compute polling namespaces - class { '::ceilometer::agent::polling': + class { 'ceilometer::agent::polling': central_namespace => true, compute_namespace => true, ipmi_namespace => false, } # Purge old meters - class { '::ceilometer::expirer': } + class { 'ceilometer::expirer': } # Install notification agent - class { '::ceilometer::agent::notification': + class { 'ceilometer::agent::notification': } } diff --git a/manifests/agent/auth.pp b/manifests/agent/auth.pp index 628a1447..a00f4433 100644 --- a/manifests/agent/auth.pp +++ b/manifests/agent/auth.pp @@ -63,7 +63,7 @@ class ceilometer::agent::auth ( $auth_type = 'password', ) { - include ::ceilometer::deps + include ceilometer::deps if ! $auth_cacert { ceilometer_config { 'service_credentials/cafile': ensure => absent } diff --git a/manifests/agent/notification.pp b/manifests/agent/notification.pp index a90f0af4..9514c424 100644 --- a/manifests/agent/notification.pp +++ b/manifests/agent/notification.pp @@ -87,8 +87,8 @@ class ceilometer::agent::notification ( $pipeline_publishers = ['gnocchi://'], ) { - include ::ceilometer::deps - include ::ceilometer::params + include ceilometer::deps + include ceilometer::params ensure_resource('package', [$::ceilometer::params::agent_notification_package_name], { diff --git a/manifests/agent/polling.pp b/manifests/agent/polling.pp index 1344abfa..9f1f2408 100644 --- a/manifests/agent/polling.pp +++ b/manifests/agent/polling.pp @@ -67,8 +67,8 @@ class ceilometer::agent::polling ( $polling_meters = $::ceilometer::params::polling_meters, ) inherits ceilometer { - include ::ceilometer::deps - include ::ceilometer::params + include ceilometer::deps + include ceilometer::params if $central_namespace { $central_namespace_name = 'central' diff --git a/manifests/config.pp b/manifests/config.pp index ae105136..f4587bee 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -26,11 +26,11 @@ # or Puppet catalog compilation will fail with duplicate resources. # class ceilometer::config ( - $ceilometer_config = {}, - $ceilometer_api_paste_ini = {}, + $ceilometer_config = {}, + $ceilometer_api_paste_ini = {}, ) { - include ::ceilometer::deps + include ceilometer::deps validate_legacy(Hash, 'validate_hash', $ceilometer_config) validate_legacy(Hash, 'validate_hash', $ceilometer_api_paste_ini) diff --git a/manifests/db.pp b/manifests/db.pp index 98202a3d..09ca61d7 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -69,7 +69,7 @@ class ceilometer::db ( $database_idle_timeout = undef, ) { - include ::ceilometer::deps + include ceilometer::deps if $database_idle_timeout { warning('The database_idle_timeout parameter is deprecated. Please use \ @@ -90,7 +90,7 @@ database_connection_recycle_time instead.') } if $sync_db { - include ::ceilometer::db::sync + include ceilometer::db::sync } } diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index b03ff8ac..8963f0bf 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -42,11 +42,11 @@ class ceilometer::db::mysql( $collate = 'utf8_general_ci', ) { - include ::ceilometer::deps + include ceilometer::deps validate_legacy(String, 'validate_string', $password) - ::openstacklib::db::mysql { 'ceilometer': + openstacklib::db::mysql { 'ceilometer': user => $user, password_hash => mysql::password($password), dbname => $dbname, diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index fdca6d75..818d871f 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -32,9 +32,9 @@ class ceilometer::db::postgresql( $privileges = 'ALL', ) { - include ::ceilometer::deps + include ceilometer::deps - ::openstacklib::db::postgresql { 'ceilometer': + openstacklib::db::postgresql { 'ceilometer': password_hash => postgresql_password($user, $password), dbname => $dbname, user => $user, diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 6b79e20e..ef7166d0 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -13,8 +13,8 @@ class ceilometer::db::sync( $extra_params = undef, ) { - include ::ceilometer::deps - include ::ceilometer::params + include ceilometer::deps + include ceilometer::params exec { 'ceilometer-upgrade': command => "${::ceilometer::params::dbsync_command} ${extra_params}", diff --git a/manifests/expirer.pp b/manifests/expirer.pp index b69db8ab..acb0055a 100644 --- a/manifests/expirer.pp +++ b/manifests/expirer.pp @@ -51,7 +51,7 @@ class ceilometer::expirer ( $weekday = '*', ) { - include ::ceilometer::params + include ceilometer::params Anchor['ceilometer::install::end'] ~> Class['ceilometer::expirer'] diff --git a/manifests/init.pp b/manifests/init.pp index 2ef2e6f3..4e2d1919 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -269,8 +269,8 @@ class ceilometer( $host = $::os_service_default, ) { - include ::ceilometer::deps - include ::ceilometer::params + include ceilometer::deps + include ceilometer::params group { 'ceilometer': ensure => present, diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index d6cd687a..1a2f2864 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -87,11 +87,11 @@ class ceilometer::keystone::auth ( $internal_url = 'http://127.0.0.1:8777', ) { - include ::ceilometer::deps + include ceilometer::deps validate_legacy(String, 'validate_string', $password) - ::keystone::resource::service_identity { 'ceilometer': + keystone::resource::service_identity { 'ceilometer': configure_user => $configure_user, configure_user_role => $configure_user_role, configure_endpoint => $configure_endpoint, diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 105d46b2..06d46037 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -203,7 +203,7 @@ class ceilometer::keystone::authtoken( $service_token_roles_required = $::os_service_default, ) { - include ::ceilometer::deps + include ceilometer::deps if is_service_default($password) { fail('Please set password for ceilometer service user') diff --git a/manifests/logging.pp b/manifests/logging.pp index 0db1dfa5..6c93acfb 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -119,7 +119,7 @@ class ceilometer::logging( $log_date_format = $::os_service_default, ) { - include ::ceilometer::deps + include ceilometer::deps oslo::log { 'ceilometer_config': debug => $debug, diff --git a/manifests/params.pp b/manifests/params.pp index 9cce6497..1b13df50 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,7 +4,7 @@ # should be considered to be constant # class ceilometer::params { - include ::openstacklib::defaults + include openstacklib::defaults $dbsync_command = 'ceilometer-upgrade' $expirer_command = 'ceilometer-expirer' diff --git a/manifests/policy.pp b/manifests/policy.pp index 9ee1ba02..82fc4c52 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -28,8 +28,8 @@ class ceilometer::policy ( $policy_path = '/etc/ceilometer/policy.json', ) { - include ::ceilometer::deps - include ::ceilometer::params + include ceilometer::deps + include ceilometer::params validate_legacy(Hash, 'validate_hash', $policies) diff --git a/spec/acceptance/ceilometer_wsgi_apache_spec.rb b/spec/acceptance/ceilometer_wsgi_apache_spec.rb index f158590d..b76c0840 100644 --- a/spec/acceptance/ceilometer_wsgi_apache_spec.rb +++ b/spec/acceptance/ceilometer_wsgi_apache_spec.rb @@ -6,12 +6,12 @@ describe 'ceilometer with mysql' do it 'should work with no errors' do pp= <<-EOS - include ::openstack_integration - include ::openstack_integration::repos - include ::openstack_integration::rabbitmq - include ::openstack_integration::mysql - include ::openstack_integration::keystone - class { '::openstack_integration::ceilometer': + include openstack_integration + include openstack_integration::repos + include openstack_integration::rabbitmq + include openstack_integration::mysql + include openstack_integration::keystone + class { 'openstack_integration::ceilometer': integration_enable => false, } EOS