From 5f77bc71aca3584d4872fff7c2f640bd778e94ec Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 21 Apr 2020 23:30:39 +0900 Subject: [PATCH] Remove unnecessory usage of hiera We don't need to use hiera if the parameter is actually implemented in the class. Change-Id: Ia916707eaecb7a6d48f992ff2112fe8507544ee1 --- manifests/profile/pacemaker/cinder/backup_bundle.pp | 4 ++-- manifests/profile/pacemaker/cinder/volume_bundle.pp | 4 ++-- manifests/profile/pacemaker/database/mysql_bundle.pp | 8 ++++---- manifests/profile/pacemaker/database/redis_bundle.pp | 8 ++++---- manifests/profile/pacemaker/manila/share_bundle.pp | 4 ++-- manifests/profile/pacemaker/ovn_dbs_bundle.pp | 12 ++++++------ manifests/profile/pacemaker/rabbitmq_bundle.pp | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/manifests/profile/pacemaker/cinder/backup_bundle.pp b/manifests/profile/pacemaker/cinder/backup_bundle.pp index 0febf73a0..a2674e822 100644 --- a/manifests/profile/pacemaker/cinder/backup_bundle.pp +++ b/manifests/profile/pacemaker/cinder/backup_bundle.pp @@ -20,7 +20,7 @@ # # [*cinder_backup_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::cinder::backup_bundle::cinder_docker_image', undef) +# Defaults to undef # # [*docker_volumes*] # (Optional) The list of volumes to be mounted in the docker container @@ -67,7 +67,7 @@ # class tripleo::profile::pacemaker::cinder::backup_bundle ( $bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'), - $cinder_backup_docker_image = hiera('tripleo::profile::pacemaker::cinder::backup_bundle::cinder_backup_docker_image', undef), + $cinder_backup_docker_image = undef, $docker_volumes = [], $docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'}, $container_backend = 'docker', diff --git a/manifests/profile/pacemaker/cinder/volume_bundle.pp b/manifests/profile/pacemaker/cinder/volume_bundle.pp index b49766724..c989d83d4 100644 --- a/manifests/profile/pacemaker/cinder/volume_bundle.pp +++ b/manifests/profile/pacemaker/cinder/volume_bundle.pp @@ -20,7 +20,7 @@ # # [*cinder_volume_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::cinder::volume_bundle::cinder_docker_image', undef) +# Defaults undef # # [*docker_volumes*] # (Optional) The list of volumes to be mounted in the docker container @@ -67,7 +67,7 @@ # class tripleo::profile::pacemaker::cinder::volume_bundle ( $bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'), - $cinder_volume_docker_image = hiera('tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image', undef), + $cinder_volume_docker_image = undef, $docker_volumes = [], $docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'}, $pcs_tries = hiera('pcs_tries', 20), diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp index fb3f3cfde..4e40f1bdd 100644 --- a/manifests/profile/pacemaker/database/mysql_bundle.pp +++ b/manifests/profile/pacemaker/database/mysql_bundle.pp @@ -20,11 +20,11 @@ # # [*mysql_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::database::mysql_bundle::mysql_docker_image', undef) +# Defaults to undef # # [*control_port*] # (Optional) The bundle's pacemaker_remote control port on the host -# Defaults to hiera('tripleo::profile::pacemaker::database::mysql_bundle::control_port', '3123') +# Defaults to 3123 # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks @@ -146,8 +146,8 @@ # Defaults to 16384 # class tripleo::profile::pacemaker::database::mysql_bundle ( - $mysql_docker_image = hiera('tripleo::profile::pacemaker::database::mysql_bundle::mysql_docker_image', undef), - $control_port = hiera('tripleo::profile::pacemaker::database::mysql_bundle::control_port', '3123'), + $mysql_docker_image = undef, + $control_port = 3123, $bootstrap_node = hiera('mysql_short_bootstrap_node_name'), $bind_address = $::hostname, $ca_file = undef, diff --git a/manifests/profile/pacemaker/database/redis_bundle.pp b/manifests/profile/pacemaker/database/redis_bundle.pp index 9e6c2d9c9..082125ec4 100644 --- a/manifests/profile/pacemaker/database/redis_bundle.pp +++ b/manifests/profile/pacemaker/database/redis_bundle.pp @@ -20,11 +20,11 @@ # # [*redis_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::redis_bundle::redis_docker_image', undef) +# Defaults to undef # # [*redis_docker_control_port*] # (Optional) The bundle's pacemaker_remote control port on the host -# Defaults to hiera('tripleo::profile::pacemaker::redis_bundle::control_port', '3124') +# Defaults to 3124 # # [*pcs_tries*] # (Optional) The number of times pcs commands should be retried. @@ -117,8 +117,8 @@ class tripleo::profile::pacemaker::database::redis_bundle ( $certificate_specs = hiera('redis_certificate_specs', {}), $enable_internal_tls = hiera('enable_internal_tls', false), $bootstrap_node = hiera('redis_short_bootstrap_node_name'), - $redis_docker_image = hiera('tripleo::profile::pacemaker::database::redis_bundle::redis_docker_image', undef), - $redis_docker_control_port = hiera('tripleo::profile::pacemaker::database::redis_bundle::control_port', '3124'), + $redis_docker_image = undef, + $redis_docker_control_port = 3124, $container_backend = 'docker', $pcs_tries = hiera('pcs_tries', 20), $log_driver = undef, diff --git a/manifests/profile/pacemaker/manila/share_bundle.pp b/manifests/profile/pacemaker/manila/share_bundle.pp index 02c8ff85e..d930cd5e9 100644 --- a/manifests/profile/pacemaker/manila/share_bundle.pp +++ b/manifests/profile/pacemaker/manila/share_bundle.pp @@ -24,7 +24,7 @@ # # [*manila_share_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::manila::share_bundle::manila_docker_image', undef) +# Defaults to undef, # # [*docker_volumes*] # (Optional) The list of volumes to be mounted in the docker container @@ -71,7 +71,7 @@ # class tripleo::profile::pacemaker::manila::share_bundle ( $bootstrap_node = hiera('manila_share_short_bootstrap_node_name'), - $manila_share_docker_image = hiera('tripleo::profile::pacemaker::manila::share_bundle::manila_share_docker_image', undef), + $manila_share_docker_image = undef, $docker_volumes = [], $docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'}, $ceph_nfs_enabled = hiera('ceph_nfs_enabled', false), diff --git a/manifests/profile/pacemaker/ovn_dbs_bundle.pp b/manifests/profile/pacemaker/ovn_dbs_bundle.pp index cc2659b00..4493dc022 100644 --- a/manifests/profile/pacemaker/ovn_dbs_bundle.pp +++ b/manifests/profile/pacemaker/ovn_dbs_bundle.pp @@ -20,11 +20,11 @@ # # [*ovn_dbs_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::ovn_dbs_docker_image', undef) +# Defaults to undef # # [*ovn_dbs_control_port*] # (Optional) The bundle's pacemaker_remote control port on the host -# Defaults to hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::control_port', '3125') +# Defaults to 3125 # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks @@ -103,8 +103,8 @@ # class tripleo::profile::pacemaker::ovn_dbs_bundle ( - $ovn_dbs_docker_image = hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::ovn_dbs_docker_image', undef), - $ovn_dbs_control_port = hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::control_port', '3125'), + $ovn_dbs_docker_image = undef, + $ovn_dbs_control_port = 3125, $bootstrap_node = hiera('ovn_dbs_short_bootstrap_node_name'), $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), @@ -120,8 +120,8 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle ( $log_file = '/var/log/containers/stdouts/ovn-dbs-bundle.log', $enable_internal_tls = hiera('enable_internal_tls', false), $ca_file = undef, - $dbs_timeout = hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::dbs_timeout', 60), - $listen_on_master_ip_only = hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::listen_on_master_ip_only', 'yes'), + $dbs_timeout = 60, + $listen_on_master_ip_only = 'yes' ) { if $bootstrap_node and $::hostname == downcase($bootstrap_node) { diff --git a/manifests/profile/pacemaker/rabbitmq_bundle.pp b/manifests/profile/pacemaker/rabbitmq_bundle.pp index afa993e2d..44813c9b7 100644 --- a/manifests/profile/pacemaker/rabbitmq_bundle.pp +++ b/manifests/profile/pacemaker/rabbitmq_bundle.pp @@ -20,11 +20,11 @@ # # [*rabbitmq_docker_image*] # (Optional) The docker image to use for creating the pacemaker bundle -# Defaults to hiera('tripleo::profile::pacemaker::rabbitmq_bundle::rabbitmq_docker_image', undef) +# Defaults to undef # # [*rabbitmq_docker_control_port*] # (Optional) The bundle's pacemaker_remote control port on the host -# Defaults to hiera('tripleo::profile::pacemaker::rabbitmq_bundle::control_port', '3122') +# Defaults to 3122 # # [*erlang_cookie*] # (Optional) Content of erlang cookie. @@ -102,8 +102,8 @@ # Defaults to 'root' # class tripleo::profile::pacemaker::rabbitmq_bundle ( - $rabbitmq_docker_image = hiera('tripleo::profile::pacemaker::rabbitmq_bundle::rabbitmq_docker_image', undef), - $rabbitmq_docker_control_port = hiera('tripleo::profile::pacemaker::rabbitmq_bundle::control_port', '3122'), + $rabbitmq_docker_image = undef, + $rabbitmq_docker_control_port = 3122, $erlang_cookie = hiera('rabbitmq::erlang_cookie'), $user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0), $rpc_scheme = hiera('oslo_messaging_rpc_scheme'),