From 5f6411c3dd3a82b9efadbc3cb6a363bf8a044fb7 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 8 Dec 2019 23:07:36 +0100 Subject: [PATCH] Convert all class usage to relative names Change-Id: I9982b8476ca9dab8a338b66db75d6da6519f9266 --- README.md | 8 ++++---- examples/site.pp | 12 ++++++------ manifests/api.pp | 10 +++++----- manifests/api_cfn.pp | 10 +++++----- manifests/cache.pp | 2 +- manifests/client.pp | 4 ++-- manifests/config.pp | 2 +- manifests/cors.pp | 2 +- manifests/db.pp | 4 ++-- manifests/db/mysql.pp | 2 +- manifests/db/postgresql.pp | 2 +- manifests/db/sync.pp | 2 +- manifests/engine.pp | 6 +++--- manifests/init.pp | 8 ++++---- manifests/keystone/auth.pp | 2 +- manifests/keystone/auth_cfn.pp | 2 +- manifests/keystone/authtoken.pp | 2 +- manifests/keystone/domain.pp | 4 ++-- manifests/logging.pp | 2 +- manifests/params.pp | 2 +- manifests/policy.pp | 4 ++-- manifests/wsgi/apache.pp | 10 +++++----- manifests/wsgi/apache_api_cfn.pp | 4 ++-- spec/acceptance/basic_heat_spec.rb | 12 ++++++------ spec/classes/heat_api_cfn_spec.rb | 2 +- spec/classes/heat_api_spec.rb | 2 +- spec/classes/heat_cron_purge_deleted_spec.rb | 2 +- spec/classes/heat_db_postgresql_spec.rb | 6 +++--- spec/classes/heat_init_spec.rb | 2 +- 29 files changed, 66 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 20ebe3c6..fa99e594 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,20 @@ documentation to assist you in understanding the available deployment options. ```puppet # enable heat resources -class { '::heat': +class { 'heat': default_transport_url => 'rabbit://heat:an_even_bigger_secret@127.0.0.1:5672/heat', database_connection => 'mysql+pymysql://heat:a_big_secret@127.0.0.1/heat?charset=utf8', identity_uri => 'http://127.0.0.1:5000/', keystone_password => 'a_big_secret', } -class { '::heat::api': } +class { 'heat::api': } -class { '::heat::engine': +class { 'heat::engine': auth_encryption_key => '1234567890AZERTYUIOPMLKJHGFDSQ12', } -class { '::heat::api_cfn': } +class { 'heat::api_cfn': } ``` Implementation diff --git a/examples/site.pp b/examples/site.pp index d67da652..71861a76 100644 --- a/examples/site.pp +++ b/examples/site.pp @@ -4,27 +4,27 @@ node default { } # First, install a mysql server - class { '::mysql::server': } + class { 'mysql::server': } # And create the database - class { '::heat::db::mysql': + class { 'heat::db::mysql': password => 'heat', } - class { '::heat::keystone::authtoken': + class { 'heat::keystone::authtoken': password => 'password', } # Common class - class { '::heat': + class { 'heat': sql_connection => 'mysql+pymysql://heat:heat@localhost/heat' } # Install heat-engine - class { '::heat::engine': + class { 'heat::engine': auth_encryption_key => 'whatever-key-you-like', } # Install the heat-api service - class { '::heat::api': } + class { 'heat::api': } } diff --git a/manifests/api.pp b/manifests/api.pp index e924aba3..8ad85436 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -68,10 +68,10 @@ class heat::api ( $service_name = $::heat::params::api_service_name, ) inherits heat::params { - include ::heat - include ::heat::deps - include ::heat::params - include ::heat::policy + include heat + include heat::deps + include heat::params + include heat::policy if $use_ssl { if is_service_default($cert_file) { @@ -106,7 +106,7 @@ class heat::api ( tag => 'heat-service', } } elsif $service_name == 'httpd' { - include ::apache::params + include apache::params service { 'heat-api': ensure => 'stopped', name => $::heat::params::api_service_name, diff --git a/manifests/api_cfn.pp b/manifests/api_cfn.pp index 1ef2fe73..3f38b09c 100644 --- a/manifests/api_cfn.pp +++ b/manifests/api_cfn.pp @@ -71,10 +71,10 @@ class heat::api_cfn ( $service_name = $::heat::params::api_cfn_service_name, ) inherits heat::params { - include ::heat - include ::heat::deps - include ::heat::params - include ::heat::policy + include heat + include heat::deps + include heat::params + include heat::policy if $use_ssl { if is_service_default($cert_file) { @@ -109,7 +109,7 @@ class heat::api_cfn ( tag => 'heat-service', } } elsif $service_name == 'httpd' { - include ::apache::params + include apache::params service { 'heat-api-cfn': ensure => 'stopped', name => $::heat::params::api_cfn_service_name, diff --git a/manifests/cache.pp b/manifests/cache.pp index 4faa03d3..09b65ee6 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -102,7 +102,7 @@ class heat::cache ( $manage_backend_package = true, ) { - include ::heat::deps + include heat::deps oslo::cache { 'heat_config': config_prefix => $config_prefix, diff --git a/manifests/client.pp b/manifests/client.pp index 5c94b106..ee6e93f8 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,8 +11,8 @@ class heat::client ( $ensure = 'present' ) { - include ::heat::deps - include ::heat::params + include heat::deps + include heat::params package { 'python-heatclient': ensure => $ensure, diff --git a/manifests/config.pp b/manifests/config.pp index 54f13ceb..8f9bea6c 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -28,7 +28,7 @@ class heat::config ( $heat_api_paste_ini = {}, ) { - include ::heat::deps + include heat::deps validate_legacy(Hash, 'validate_hash', $heat_config) validate_legacy(Hash, 'validate_hash', $heat_api_paste_ini) diff --git a/manifests/cors.pp b/manifests/cors.pp index efbd683e..2c24cbd8 100644 --- a/manifests/cors.pp +++ b/manifests/cors.pp @@ -45,7 +45,7 @@ class heat::cors ( $allow_headers = $::os_service_default, ) { - include ::heat::deps + include heat::deps oslo::cors { 'heat_config': allowed_origin => $allowed_origin, diff --git a/manifests/db.pp b/manifests/db.pp index fbd22b34..d244d281 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -68,7 +68,7 @@ class heat::db ( $database_idle_timeout = undef, ) { - include ::heat::deps + include heat::deps if $database_idle_timeout { warning('The database_idle_timeout parameter is deprecated. Please use \ @@ -102,7 +102,7 @@ database_connection_recycle_time instead.') } if $sync_db_real { - include ::heat::db::sync + include heat::db::sync } } diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 616193fe..1987d217 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -43,7 +43,7 @@ class heat::db::mysql( $collate = 'utf8_general_ci', ) { - include ::heat::deps + include heat::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 9307df3f..425bcef1 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -32,7 +32,7 @@ class heat::db::postgresql( $privileges = 'ALL', ) { - include ::heat::deps + include heat::deps ::openstacklib::db::postgresql { 'heat': password_hash => postgresql_password($user, $password), diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index b03fb74f..39fb5d4b 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -13,7 +13,7 @@ class heat::db::sync( $extra_params = '--config-file /etc/heat/heat.conf', ) { - include ::heat::deps + include heat::deps exec { 'heat-dbsync': command => "heat-manage ${extra_params} db_sync", diff --git a/manifests/engine.pp b/manifests/engine.pp index 244c2c6a..0774674c 100644 --- a/manifests/engine.pp +++ b/manifests/engine.pp @@ -159,7 +159,7 @@ class heat::engine ( $heat_watch_server_url = undef, ) { - include ::heat::deps + include heat::deps if $heat_watch_server_url { warning('heat_watch_server_url has no effect and will be removed in a future release.') @@ -174,8 +174,8 @@ class heat::engine ( fail("${param_size} is not a correct size for auth_encryption_key parameter, it must be either 16, 24, 32 bytes long.") } - include ::heat - include ::heat::params + include heat + include heat::params # plugin_dirs value follows these rules: # - default is $::os_service_default so Puppet won't try to configure it. diff --git a/manifests/init.pp b/manifests/init.pp index 4f68a46c..bb026caf 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -344,12 +344,12 @@ class heat( $yaql_limit_iterators = $::os_service_default, ) { - include ::heat::db - include ::heat::deps - include ::heat::params + include heat::db + include heat::deps + include heat::params if $auth_strategy == 'keystone' { - include ::heat::keystone::authtoken + include heat::keystone::authtoken } package { 'heat-common': diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index dcf4ad9d..13296bd4 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -118,7 +118,7 @@ class heat::keystone::auth ( $manage_heat_stack_user_role = true, ) { - include ::heat::deps + include heat::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/keystone/auth_cfn.pp b/manifests/keystone/auth_cfn.pp index 8d5ac068..038f1e14 100644 --- a/manifests/keystone/auth_cfn.pp +++ b/manifests/keystone/auth_cfn.pp @@ -88,7 +88,7 @@ class heat::keystone::auth_cfn ( $internal_url = 'http://127.0.0.1:8000/v1', ) { - include ::heat::deps + include heat::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 9d9a86c5..cec3cff6 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -214,7 +214,7 @@ class heat::keystone::authtoken( $service_token_roles_required = $::os_service_default, ) { - include ::heat::deps + include heat::deps if is_service_default($password) { fail('Please set password for heat service user') diff --git a/manifests/keystone/domain.pp b/manifests/keystone/domain.pp index 98c50131..6cf7cc12 100644 --- a/manifests/keystone/domain.pp +++ b/manifests/keystone/domain.pp @@ -45,8 +45,8 @@ class heat::keystone::domain ( $manage_config = true, ) { - include ::heat::deps - include ::heat::params + include heat::deps + include heat::params if $manage_domain { ensure_resource('keystone_domain', $domain_name, { diff --git a/manifests/logging.pp b/manifests/logging.pp index 49c915af..24c57adf 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -119,7 +119,7 @@ class heat::logging( $log_date_format = $::os_service_default, ) { - include ::heat::deps + include heat::deps oslo::log { 'heat_config': debug => $debug, diff --git a/manifests/params.pp b/manifests/params.pp index 0208f5f0..49789302 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,7 @@ # Parameters for puppet-heat # class heat::params { - include ::openstacklib::defaults + include openstacklib::defaults $pyvers = $::openstacklib::defaults::pyvers $client_package_name = "python${pyvers}-heatclient" diff --git a/manifests/policy.pp b/manifests/policy.pp index 79b3dd9c..defe7e8e 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -28,8 +28,8 @@ class heat::policy ( $policy_path = '/etc/heat/policy.json', ) { - include ::heat::deps - include ::heat::params + include heat::deps + include heat::params validate_legacy(Hash, 'validate_hash', $policies) diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index a361ac3d..336f702c 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -129,12 +129,12 @@ define heat::wsgi::apache ( if $title !~ /^api(|_cfn)$/ { fail('The valid options are api, api_cfn') } - include ::heat::deps - include ::heat::params - include ::apache - include ::apache::mod::wsgi + include heat::deps + include heat::params + include apache + include apache::mod::wsgi if $ssl { - include ::apache::mod::ssl + include apache::mod::ssl } ::openstacklib::wsgi::apache { "heat_${title}_wsgi": diff --git a/manifests/wsgi/apache_api_cfn.pp b/manifests/wsgi/apache_api_cfn.pp index f8f64e17..9e0d7ba0 100644 --- a/manifests/wsgi/apache_api_cfn.pp +++ b/manifests/wsgi/apache_api_cfn.pp @@ -119,8 +119,8 @@ class heat::wsgi::apache_api_cfn ( ) { # See custom fragment below - include ::apache - include ::apache::mod::headers + include apache + include apache::mod::headers validate_legacy(Integer, 'validate_integer', $port) diff --git a/spec/acceptance/basic_heat_spec.rb b/spec/acceptance/basic_heat_spec.rb index b49ed21a..cc813085 100644 --- a/spec/acceptance/basic_heat_spec.rb +++ b/spec/acceptance/basic_heat_spec.rb @@ -6,12 +6,12 @@ describe 'basic heat' 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::heat + include openstack_integration + include openstack_integration::repos + include openstack_integration::rabbitmq + include openstack_integration::mysql + include openstack_integration::keystone + include openstack_integration::heat EOS diff --git a/spec/classes/heat_api_cfn_spec.rb b/spec/classes/heat_api_cfn_spec.rb index cde3cfb2..9230e8e3 100644 --- a/spec/classes/heat_api_cfn_spec.rb +++ b/spec/classes/heat_api_cfn_spec.rb @@ -97,7 +97,7 @@ describe 'heat::api_cfn' do context 'with $sync_db set to false in ::heat' do let :pre_condition do - "class { '::heat::keystone::authtoken': + "class { 'heat::keystone::authtoken': password => 'a_big_secret', } class {'heat': diff --git a/spec/classes/heat_api_spec.rb b/spec/classes/heat_api_spec.rb index 95239161..99e3e116 100644 --- a/spec/classes/heat_api_spec.rb +++ b/spec/classes/heat_api_spec.rb @@ -97,7 +97,7 @@ describe 'heat::api' do context 'with $sync_db set to false in ::heat' do let :pre_condition do - "class { '::heat::keystone::authtoken': + "class { 'heat::keystone::authtoken': password => 'a_big_secret', } class {'heat': diff --git a/spec/classes/heat_cron_purge_deleted_spec.rb b/spec/classes/heat_cron_purge_deleted_spec.rb index 7dfa942d..9cca71da 100644 --- a/spec/classes/heat_cron_purge_deleted_spec.rb +++ b/spec/classes/heat_cron_purge_deleted_spec.rb @@ -21,7 +21,7 @@ describe 'heat::cron::purge_deleted' do "class { 'heat::keystone::authtoken': password => 'password', } - include ::heat" + include heat" end describe 'with default parameters' do diff --git a/spec/classes/heat_db_postgresql_spec.rb b/spec/classes/heat_db_postgresql_spec.rb index 17ad264b..c06546b0 100644 --- a/spec/classes/heat_db_postgresql_spec.rb +++ b/spec/classes/heat_db_postgresql_spec.rb @@ -7,11 +7,11 @@ describe 'heat::db::postgresql' do end let :pre_condition do - "include ::postgresql::server - class { '::heat::keystone::authtoken': + "include postgresql::server + class { 'heat::keystone::authtoken': password => 'password', } - include ::heat" + include heat" end context 'with only required parameters' do diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 7af78c2c..2378fdb0 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'heat' do let :pre_condition do - "class { '::heat::keystone::authtoken': + "class { 'heat::keystone::authtoken': password => 'secretpassword', }" end