From 48f8bb2723cbc0b1ea237820075121a9b8f9511c Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 8 Dec 2019 23:10:58 +0100 Subject: [PATCH] Convert all class usage to relative names Change-Id: If72477841529ea17c10963846c5ad0fb65e373ba --- examples/init.pp | 2 +- examples/workflow.pp | 2 +- manifests/api.pp | 10 +++++----- manifests/client.pp | 4 ++-- manifests/config.pp | 2 +- manifests/cors.pp | 2 +- manifests/cron_trigger.pp | 4 ++-- manifests/db.pp | 2 +- manifests/db/mysql.pp | 2 +- manifests/db/postgresql.pp | 2 +- manifests/db/sync.pp | 4 ++-- manifests/engine.pp | 4 ++-- manifests/event_engine.pp | 4 ++-- manifests/executor.pp | 4 ++-- manifests/init.pp | 8 ++++---- manifests/keystone/auth.pp | 2 +- manifests/keystone/authtoken.pp | 2 +- manifests/logging.pp | 2 +- manifests/notifier.pp | 4 ++-- manifests/params.pp | 2 +- manifests/policy.pp | 4 ++-- manifests/wsgi/apache.pp | 10 +++++----- spec/acceptance/basic_mistral_spec.rb | 12 ++++++------ spec/classes/mistral_api_spec.rb | 10 +++++----- spec/classes/mistral_init_spec.rb | 2 +- 25 files changed, 53 insertions(+), 53 deletions(-) diff --git a/examples/init.pp b/examples/init.pp index 20360e3..176411f 100644 --- a/examples/init.pp +++ b/examples/init.pp @@ -9,4 +9,4 @@ # Learn more about module testing here: # https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module # -include ::mistral +include mistral diff --git a/examples/workflow.pp b/examples/workflow.pp index f9a70fe..5517ccb 100644 --- a/examples/workflow.pp +++ b/examples/workflow.pp @@ -1 +1 @@ -class { '::mistral:workflow': } +class { 'mistral:workflow': } diff --git a/manifests/api.pp b/manifests/api.pp index 3088ed1..cb3588c 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -72,12 +72,12 @@ class mistral::api ( $auth_strategy = 'keystone', ) inherits mistral::params { - include ::mistral::deps - include ::mistral::params - include ::mistral::policy + include mistral::deps + include mistral::params + include mistral::policy if $auth_strategy == 'keystone' { - include ::mistral::keystone::authtoken + include mistral::keystone::authtoken } package { 'mistral-api': @@ -104,7 +104,7 @@ class mistral::api ( tag => 'mistral-service', } } elsif $service_name == 'httpd' { - include ::apache::params + include apache::params service { 'mistral-api': ensure => 'stopped', name => $::mistral::params::api_service_name, diff --git a/manifests/client.pp b/manifests/client.pp index 209b914..4c385f9 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,8 +11,8 @@ class mistral::client( $package_ensure = 'present' ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params package { 'python-mistralclient': ensure => $package_ensure, diff --git a/manifests/config.pp b/manifests/config.pp index b99af02..452b4cf 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -24,7 +24,7 @@ class mistral::config ( $mistral_config = {}, ) { - include ::mistral::deps + include mistral::deps validate_legacy(Hash, 'validate_hash', $mistral_config) diff --git a/manifests/cors.pp b/manifests/cors.pp index 8aa604f..12d3bae 100644 --- a/manifests/cors.pp +++ b/manifests/cors.pp @@ -45,7 +45,7 @@ class mistral::cors ( $allow_headers = $::os_service_default, ) { - include ::mistral::deps + include mistral::deps oslo::cors { 'mistral_config': allowed_origin => $allowed_origin, diff --git a/manifests/cron_trigger.pp b/manifests/cron_trigger.pp index 384a680..25b3758 100644 --- a/manifests/cron_trigger.pp +++ b/manifests/cron_trigger.pp @@ -28,8 +28,8 @@ class mistral::cron_trigger ( $execution_interval = $::os_service_default, ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params mistral_config { 'cron_trigger/enabled': value => $enabled; diff --git a/manifests/db.pp b/manifests/db.pp index 40f2035..0ccb01a 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -62,7 +62,7 @@ class mistral::db ( $database_idle_timeout = undef, ) { - include ::mistral::deps + include mistral::deps if $database_idle_timeout { warning('The database_idle_timeout parameter is deprecated. Please use \ diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 6314e5e..4f7574f 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -43,7 +43,7 @@ class mistral::db::mysql( $allowed_hosts = undef ) { - include ::mistral::deps + include mistral::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 12a35dd..ec1c60d 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -32,7 +32,7 @@ class mistral::db::postgresql( $privileges = 'ALL', ) { - include ::mistral::deps + include mistral::deps ::openstacklib::db::postgresql { 'mistral': password_hash => postgresql_password($user, $password), diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index e2a8dc4..3a7b0a0 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -3,8 +3,8 @@ # class mistral::db::sync { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params exec { 'mistral-db-sync': command => $::mistral::params::db_sync_command, diff --git a/manifests/engine.pp b/manifests/engine.pp index a82b861..72346b9 100644 --- a/manifests/engine.pp +++ b/manifests/engine.pp @@ -59,8 +59,8 @@ class mistral::engine ( $older_than = $::os_service_default, ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params package { 'mistral-engine': ensure => $package_ensure, diff --git a/manifests/event_engine.pp b/manifests/event_engine.pp index 2060d78..696cde7 100644 --- a/manifests/event_engine.pp +++ b/manifests/event_engine.pp @@ -37,8 +37,8 @@ class mistral::event_engine ( $event_definitions_cfg_file = $::os_service_default, ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params package { 'mistral-event-engine': ensure => $package_ensure, diff --git a/manifests/executor.pp b/manifests/executor.pp index c862121..f537ab2 100644 --- a/manifests/executor.pp +++ b/manifests/executor.pp @@ -37,8 +37,8 @@ class mistral::executor ( $version = $::os_service_default, ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params package { 'mistral-executor': ensure => $package_ensure, diff --git a/manifests/init.pp b/manifests/init.pp index b7332f0..acace84 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -222,9 +222,9 @@ class mistral( $first_heartbeat_timeout = $::os_service_default, ){ - include ::mistral::deps - include ::mistral::params - include ::mistral::db + include mistral::deps + include mistral::params + include mistral::db package { 'mistral-common': ensure => $package_ensure, @@ -275,6 +275,6 @@ class mistral( } if $sync_db { - include ::mistral::db::sync + include mistral::db::sync } } diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6e05af9..327ba70 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -81,7 +81,7 @@ class mistral::keystone::auth( $service_description = 'OpenStack Workflow Service', ) { - include ::mistral::deps + include mistral::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 611e236..eda1820 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -203,7 +203,7 @@ class mistral::keystone::authtoken( $service_token_roles_required = $::os_service_default, ) { - include ::mistral::deps + include mistral::deps if is_service_default($password) { fail('Please set password for mistral service user') diff --git a/manifests/logging.pp b/manifests/logging.pp index f19fc63..10f1dea 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -120,7 +120,7 @@ class mistral::logging( $log_date_format = $::os_service_default, ) { - include ::mistral::deps + include mistral::deps oslo::log { 'mistral_config': use_syslog => $use_syslog, diff --git a/manifests/notifier.pp b/manifests/notifier.pp index ec6e924..017bdfc 100644 --- a/manifests/notifier.pp +++ b/manifests/notifier.pp @@ -34,8 +34,8 @@ class mistral::notifier( $notify_publishers = $::os_service_default, ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params mistral_config { 'notifier/type': value => $type; diff --git a/manifests/params.pp b/manifests/params.pp index ea85e65..cf6b97f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,7 @@ # Parameters for puppet-mistral # class mistral::params { - include ::openstacklib::defaults + include openstacklib::defaults $pyvers = $::openstacklib::defaults::pyvers $client_package = "python${pyvers}-mistralclient" diff --git a/manifests/policy.pp b/manifests/policy.pp index 3ddddc7..70aaddc 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -28,8 +28,8 @@ class mistral::policy ( $policy_path = '/etc/mistral/policy.json', ) { - include ::mistral::deps - include ::mistral::params + include mistral::deps + include mistral::params validate_legacy(Hash, 'validate_hash', $policies) diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 4baa474..f0e480d 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -123,12 +123,12 @@ class mistral::wsgi::apache ( $custom_wsgi_process_options = {}, ) { - include ::mistral::deps - include ::mistral::params - include ::apache - include ::apache::mod::wsgi + include mistral::deps + include mistral::params + include apache + include apache::mod::wsgi if $ssl { - include ::apache::mod::ssl + include apache::mod::ssl } # The httpd package is untagged, but needs to have ordering enforced, diff --git a/spec/acceptance/basic_mistral_spec.rb b/spec/acceptance/basic_mistral_spec.rb index 9e6b2c4..474f8b9 100644 --- a/spec/acceptance/basic_mistral_spec.rb +++ b/spec/acceptance/basic_mistral_spec.rb @@ -6,12 +6,12 @@ describe 'basic mistral' 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 - include ::openstack_integration::mistral + include openstack_integration + include openstack_integration::repos + include openstack_integration::rabbitmq + include openstack_integration::mysql + include openstack_integration::keystone + include openstack_integration::mistral EOS diff --git a/spec/classes/mistral_api_spec.rb b/spec/classes/mistral_api_spec.rb index 67dd1d1..57a1657 100644 --- a/spec/classes/mistral_api_spec.rb +++ b/spec/classes/mistral_api_spec.rb @@ -15,7 +15,7 @@ describe 'mistral::api' do end let :pre_condition do - "class { '::mistral::keystone::authtoken': + "class { 'mistral::keystone::authtoken': password => 'foo', }" end @@ -103,10 +103,10 @@ describe 'mistral::api' do end let :pre_condition do - "include ::apache - include ::mistral::db - class { '::mistral': } - class { '::mistral::keystone::authtoken': + "include apache + include mistral::db + class { 'mistral': } + class { 'mistral::keystone::authtoken': password => 'foo', }" end diff --git a/spec/classes/mistral_init_spec.rb b/spec/classes/mistral_init_spec.rb index 9022be7..f324dbc 100644 --- a/spec/classes/mistral_init_spec.rb +++ b/spec/classes/mistral_init_spec.rb @@ -9,7 +9,7 @@ describe 'mistral' do end let :pre_condition do - "class { '::mistral::keystone::authtoken': + "class { 'mistral::keystone::authtoken': password => 'foo', }" end