From 748caaf1f02894304f1c7a103c1efcd88fb690ea Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Thu, 8 Dec 2016 10:24:19 +0800 Subject: [PATCH] Remove useless hook Change-Id: I74903cba1897844fce8d20e1bddae0267d2d1ca0 --- manifests/config.pp | 1 + manifests/db.pp | 1 + manifests/db/mysql.pp | 3 +-- manifests/db/postgresql.pp | 4 +--- manifests/db/sync.pp | 2 +- manifests/init.pp | 1 + manifests/keystone/authtoken.pp | 1 + manifests/logging.pp | 1 + manifests/policy.pp | 1 + 9 files changed, 9 insertions(+), 6 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 1a730f5..5cba05e 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -23,6 +23,7 @@ class glare::config ( $glare_config = {}, ) { + include ::glare::deps validate_hash($glare_config) diff --git a/manifests/db.pp b/manifests/db.pp index 1200eb6..584d054 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -48,6 +48,7 @@ class glare::db ( $database_retry_interval = $::os_service_default, $database_max_overflow = $::os_service_default, ) { + include ::glare::deps validate_re($database_connection, diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 9f47ba9..6876065 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -52,6 +52,7 @@ class glare::db::mysql( $collate = 'utf8_general_ci', $allowed_hosts = undef ) { + include ::glare::deps validate_string($password) @@ -66,8 +67,6 @@ class glare::db::mysql( allowed_hosts => $allowed_hosts, } - ::Openstacklib::Db::Mysql['glare'] ~> Exec<| title == 'glare-db-sync' |> - Anchor['glare::db::begin'] ~> Class['glare::db::mysql'] ~> Anchor['glare::db::end'] diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 88a421b..9c88cb4 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -39,9 +39,8 @@ class glare::db::postgresql( $encoding = undef, $privileges = 'ALL', ) { - include ::glare::deps - Class['glare::db::postgresql'] -> Service<| title == 'glare' |> + include ::glare::deps ::openstacklib::db::postgresql { 'glare': password_hash => postgresql_password($user, $password), @@ -51,7 +50,6 @@ class glare::db::postgresql( privileges => $privileges, } - ::Openstacklib::Db::Postgresql['glare'] ~> Exec<| title == 'glare-db-sync' |> Anchor['glare::db::begin'] ~> Class['glare::db::postgresql'] ~> Anchor['glare::db::end'] diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index c80c888..437766a 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -12,6 +12,7 @@ class glare::db::sync( $extra_params = '', ) { + include ::glare::deps exec { 'glare-db-sync': @@ -26,5 +27,4 @@ class glare::db::sync( ], notify => Anchor['glare::dbsync::end'], } - Exec['glare-db-sync'] ~> Service<| title == 'glare' |> } diff --git a/manifests/init.pp b/manifests/init.pp index ff1051f..f7a41ba 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -115,6 +115,7 @@ class glare ( $allow_anonymous_access = $::os_service_default, $purge_config = false, ) { + include ::glare::params include ::glare::db include ::glare::logging diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index f6bf4d4..bf471e0 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -221,6 +221,7 @@ class glare::keystone::authtoken( $signing_dir = $::os_service_default, $token_cache_time = $::os_service_default, ) { + include ::glare::deps keystone::resource::authtoken { 'glare_config': diff --git a/manifests/logging.pp b/manifests/logging.pp index a301d72..1d44fc9 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -112,6 +112,7 @@ class glare::logging( $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, ) { + include ::glare::deps oslo::log { 'glare_config': diff --git a/manifests/policy.pp b/manifests/policy.pp index d0232f8..dc0b980 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -27,6 +27,7 @@ class glare::policy ( $policies = {}, $policy_path = '/etc/glare/policy.json', ) { + include ::glare::deps validate_hash($policies)