Convert all class usage to relative names
Change-Id: Ib0d2c8567775e0b5aa7a0799851b340cb50b784e
This commit is contained in:
parent
663a819831
commit
d75de30b72
@ -1,19 +1,19 @@
|
|||||||
class { '::aodh': }
|
class { 'aodh': }
|
||||||
class { '::aodh::keystone::authtoken':
|
class { 'aodh::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
class { '::aodh::api':
|
class { 'aodh::api':
|
||||||
enabled => true,
|
enabled => true,
|
||||||
service_name => 'httpd',
|
service_name => 'httpd',
|
||||||
}
|
}
|
||||||
include ::apache
|
include apache
|
||||||
class { '::aodh::wsgi::apache':
|
class { 'aodh::wsgi::apache':
|
||||||
ssl => false,
|
ssl => false,
|
||||||
}
|
}
|
||||||
class { '::aodh::auth':
|
class { 'aodh::auth':
|
||||||
auth_password => 'a_big_secret',
|
auth_password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
class { '::aodh::evaluator': }
|
class { 'aodh::evaluator': }
|
||||||
class { '::aodh::notifier': }
|
class { 'aodh::notifier': }
|
||||||
class { '::aodh::listener': }
|
class { 'aodh::listener': }
|
||||||
class { '::aodh::client': }
|
class { 'aodh::client': }
|
||||||
|
@ -62,12 +62,12 @@ class aodh::api (
|
|||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
include ::aodh::policy
|
include aodh::policy
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::aodh::keystone::authtoken
|
include aodh::keystone::authtoken
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'aodh-api':
|
package { 'aodh-api':
|
||||||
@ -85,7 +85,7 @@ class aodh::api (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
include ::aodh::db::sync
|
include aodh::db::sync
|
||||||
}
|
}
|
||||||
|
|
||||||
if $service_name == $::aodh::params::api_service_name {
|
if $service_name == $::aodh::params::api_service_name {
|
||||||
@ -98,7 +98,7 @@ class aodh::api (
|
|||||||
tag => 'aodh-service',
|
tag => 'aodh-service',
|
||||||
}
|
}
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
include ::apache::params
|
include apache::params
|
||||||
service { 'aodh-api':
|
service { 'aodh-api':
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::aodh::params::api_service_name,
|
name => $::aodh::params::api_service_name,
|
||||||
|
@ -61,7 +61,7 @@ class aodh::auth (
|
|||||||
$interface = $::os_service_default,
|
$interface = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'service_credentials/auth_url' : value => $auth_url;
|
'service_credentials/auth_url' : value => $auth_url;
|
||||||
|
@ -10,8 +10,8 @@ class aodh::client (
|
|||||||
$ensure = 'present'
|
$ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
|
|
||||||
package { 'python-aodhclient':
|
package { 'python-aodhclient':
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
@ -19,7 +19,6 @@ class aodh::client (
|
|||||||
tag => 'openstack',
|
tag => 'openstack',
|
||||||
}
|
}
|
||||||
|
|
||||||
include '::openstacklib::openstackclient'
|
include openstacklib::openstackclient
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class aodh::config (
|
|||||||
$aodh_api_paste_ini = {},
|
$aodh_api_paste_ini = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $aodh_config)
|
validate_legacy(Hash, 'validate_hash', $aodh_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $aodh_api_paste_ini)
|
validate_legacy(Hash, 'validate_hash', $aodh_api_paste_ini)
|
||||||
|
@ -67,7 +67,7 @@ class aodh::db (
|
|||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
if $database_idle_timeout {
|
if $database_idle_timeout {
|
||||||
warning('The database_idle_timeout parameter is deprecated. Please use \
|
warning('The database_idle_timeout parameter is deprecated. Please use \
|
||||||
|
@ -43,11 +43,11 @@ class aodh::db::mysql(
|
|||||||
$allowed_hosts = undef
|
$allowed_hosts = undef
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
::openstacklib::db::mysql { 'aodh':
|
openstacklib::db::mysql { 'aodh':
|
||||||
user => $user,
|
user => $user,
|
||||||
password_hash => mysql::password($password),
|
password_hash => mysql::password($password),
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
|
@ -32,9 +32,9 @@ class aodh::db::postgresql(
|
|||||||
$privileges = 'ALL',
|
$privileges = 'ALL',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'aodh':
|
openstacklib::db::postgresql { 'aodh':
|
||||||
password_hash => postgresql_password($user, $password),
|
password_hash => postgresql_password($user, $password),
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
user => $user,
|
user => $user,
|
||||||
|
@ -9,7 +9,7 @@ class aodh::db::sync (
|
|||||||
$user = 'aodh',
|
$user = 'aodh',
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
exec { 'aodh-db-sync':
|
exec { 'aodh-db-sync':
|
||||||
command => 'aodh-dbsync --config-file /etc/aodh/aodh.conf',
|
command => 'aodh-dbsync --config-file /etc/aodh/aodh.conf',
|
||||||
|
@ -29,8 +29,8 @@ class aodh::evaluator (
|
|||||||
$evaluation_interval = $::os_service_default,
|
$evaluation_interval = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'DEFAULT/evaluation_interval' : value => $evaluation_interval;
|
'DEFAULT/evaluation_interval' : value => $evaluation_interval;
|
||||||
|
@ -271,8 +271,8 @@ class aodh (
|
|||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::db
|
include aodh::db
|
||||||
|
|
||||||
package { 'aodh':
|
package { 'aodh':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
@ -79,7 +79,7 @@ class aodh::keystone::auth (
|
|||||||
$admin_url = 'http://127.0.0.1:8042',
|
$admin_url = 'http://127.0.0.1:8042',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
keystone::resource::service_identity { 'aodh':
|
keystone::resource::service_identity { 'aodh':
|
||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
|
@ -214,7 +214,7 @@ class aodh::keystone::authtoken(
|
|||||||
$service_token_roles_required = $::os_service_default,
|
$service_token_roles_required = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
if is_service_default($password) {
|
||||||
fail('Please set password for Aodh service user')
|
fail('Please set password for Aodh service user')
|
||||||
|
@ -19,8 +19,8 @@ class aodh::listener (
|
|||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
|
|
||||||
ensure_resource( 'package', [$::aodh::params::listener_package_name],
|
ensure_resource( 'package', [$::aodh::params::listener_package_name],
|
||||||
{ ensure => $package_ensure,
|
{ ensure => $package_ensure,
|
||||||
|
@ -120,7 +120,7 @@ class aodh::logging(
|
|||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
oslo::log { 'aodh_config':
|
oslo::log { 'aodh_config':
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
|
@ -19,8 +19,8 @@ class aodh::notifier (
|
|||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
|
|
||||||
ensure_resource( 'package', [$::aodh::params::notifier_package_name],
|
ensure_resource( 'package', [$::aodh::params::notifier_package_name],
|
||||||
{ ensure => $package_ensure,
|
{ ensure => $package_ensure,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Parameters for puppet-aodh
|
# Parameters for puppet-aodh
|
||||||
#
|
#
|
||||||
class aodh::params {
|
class aodh::params {
|
||||||
include ::openstacklib::defaults
|
include openstacklib::defaults
|
||||||
$pyvers = $::openstacklib::defaults::pyvers
|
$pyvers = $::openstacklib::defaults::pyvers
|
||||||
|
|
||||||
$client_package_name = "python${pyvers}-aodhclient"
|
$client_package_name = "python${pyvers}-aodhclient"
|
||||||
|
@ -28,8 +28,8 @@ class aodh::policy (
|
|||||||
$policy_path = '/etc/aodh/policy.json',
|
$policy_path = '/etc/aodh/policy.json',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
|
||||||
|
@ -124,19 +124,19 @@ class aodh::wsgi::apache (
|
|||||||
$custom_wsgi_process_options = {},
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include aodh::deps
|
||||||
include ::aodh::params
|
include aodh::params
|
||||||
include ::apache
|
include apache
|
||||||
include ::apache::mod::wsgi
|
include apache::mod::wsgi
|
||||||
if $ssl {
|
if $ssl {
|
||||||
include ::apache::mod::ssl
|
include apache::mod::ssl
|
||||||
}
|
}
|
||||||
|
|
||||||
# NOTE(aschultz): needed because the packaging may introduce some apache
|
# NOTE(aschultz): needed because the packaging may introduce some apache
|
||||||
# configuration files that apache may remove. See LP#1657847
|
# configuration files that apache may remove. See LP#1657847
|
||||||
Anchor['aodh::install::end'] -> Class['apache']
|
Anchor['aodh::install::end'] -> Class['apache']
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'aodh_wsgi':
|
openstacklib::wsgi::apache { 'aodh_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
bind_port => $port,
|
bind_port => $port,
|
||||||
group => 'aodh',
|
group => 'aodh',
|
||||||
|
@ -6,12 +6,12 @@ describe 'basic aodh' do
|
|||||||
|
|
||||||
it 'should work with no errors' do
|
it 'should work with no errors' do
|
||||||
pp= <<-EOS
|
pp= <<-EOS
|
||||||
include ::openstack_integration
|
include openstack_integration
|
||||||
include ::openstack_integration::repos
|
include openstack_integration::repos
|
||||||
include ::openstack_integration::rabbitmq
|
include openstack_integration::rabbitmq
|
||||||
include ::openstack_integration::mysql
|
include openstack_integration::mysql
|
||||||
include ::openstack_integration::keystone
|
include openstack_integration::keystone
|
||||||
include ::openstack_integration::aodh
|
include openstack_integration::aodh
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ describe 'aodh::api' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'aodh': }
|
"class { 'aodh': }
|
||||||
include ::aodh::db
|
include aodh::db
|
||||||
class { '::aodh::keystone::authtoken':
|
class { 'aodh::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}"
|
}"
|
||||||
end
|
end
|
||||||
@ -129,10 +129,10 @@ describe 'aodh::api' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"include ::apache
|
"include apache
|
||||||
include ::aodh::db
|
include aodh::db
|
||||||
class { 'aodh': }
|
class { 'aodh': }
|
||||||
class { '::aodh::keystone::authtoken':
|
class { 'aodh::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}"
|
}"
|
||||||
end
|
end
|
||||||
@ -153,10 +153,10 @@ describe 'aodh::api' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"include ::apache
|
"include apache
|
||||||
include ::aodh::db
|
include aodh::db
|
||||||
class { 'aodh': }
|
class { 'aodh': }
|
||||||
class { '::aodh::keystone::authtoken':
|
class { 'aodh::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}"
|
}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user