Convert all class usage to relative names
Change-Id: Ie5227ac581af00f445f71b2aaa05e6d1d8363324
This commit is contained in:
parent
fa684cc84e
commit
5f2875f245
@ -9,4 +9,4 @@
|
||||
# Learn more about module testing here:
|
||||
# https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module
|
||||
#
|
||||
include ::watcher
|
||||
include watcher
|
||||
|
@ -169,11 +169,11 @@ class watcher::api (
|
||||
$auth_strategy = 'keystone',
|
||||
) inherits watcher::params {
|
||||
|
||||
include ::watcher::policy
|
||||
include ::watcher::deps
|
||||
include watcher::policy
|
||||
include watcher::deps
|
||||
|
||||
if $auth_strategy == 'keystone' {
|
||||
include ::watcher::keystone::authtoken
|
||||
include watcher::keystone::authtoken
|
||||
}
|
||||
|
||||
validate_legacy(String, 'validate_string', $watcher_client_password)
|
||||
@ -193,11 +193,11 @@ class watcher::api (
|
||||
}
|
||||
|
||||
if $create_db_schema {
|
||||
include ::watcher::db::create_schema
|
||||
include watcher::db::create_schema
|
||||
}
|
||||
|
||||
if $upgrade_db {
|
||||
include ::watcher::db::upgrade
|
||||
include watcher::db::upgrade
|
||||
}
|
||||
|
||||
if $service_name == $::watcher::params::api_service_name {
|
||||
@ -213,7 +213,7 @@ class watcher::api (
|
||||
'watcher-db-manage-upgrade'],
|
||||
}
|
||||
} elsif $service_name == 'httpd' {
|
||||
include ::apache::params
|
||||
include apache::params
|
||||
service { 'watcher-api':
|
||||
ensure => 'stopped',
|
||||
name => $::watcher::params::api_service_name,
|
||||
|
@ -47,8 +47,8 @@ class watcher::applier (
|
||||
$applier_workflow_engine = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::watcher::params
|
||||
include ::watcher::deps
|
||||
include watcher::params
|
||||
include watcher::deps
|
||||
|
||||
package { 'watcher-applier':
|
||||
ensure => $package_ensure,
|
||||
|
@ -12,8 +12,8 @@ class watcher::client (
|
||||
$ensure = 'present'
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include ::watcher::params
|
||||
include watcher::deps
|
||||
include watcher::params
|
||||
|
||||
package { 'python-watcherclient':
|
||||
ensure => $ensure,
|
||||
|
@ -24,7 +24,7 @@ class watcher::config (
|
||||
$watcher_config = {},
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $watcher_config)
|
||||
|
||||
|
@ -62,7 +62,7 @@ class watcher::db (
|
||||
$database_idle_timeout = undef,
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
if $database_idle_timeout {
|
||||
warning('The database_idle_timeout parameter is deprecated. Please use \
|
||||
|
@ -12,7 +12,7 @@ class watcher::db::create_schema(
|
||||
$extra_params = '--config-file /etc/watcher/watcher.conf',
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
exec { 'watcher-db-manage-create_schema':
|
||||
command => "watcher-db-manage ${extra_params} create_schema",
|
||||
|
@ -43,7 +43,7 @@ class watcher::db::mysql(
|
||||
$allowed_hosts = undef
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class watcher::db::postgresql(
|
||||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'watcher':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
|
@ -13,7 +13,7 @@ class watcher::db::upgrade(
|
||||
$extra_params = '--config-file /etc/watcher/watcher.conf',
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
exec { 'watcher-db-manage-upgrade':
|
||||
command => "watcher-db-manage ${extra_params} upgrade",
|
||||
|
@ -64,8 +64,8 @@ class watcher::decision_engine (
|
||||
$weights = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::watcher::params
|
||||
include ::watcher::deps
|
||||
include watcher::params
|
||||
include watcher::deps
|
||||
|
||||
if !is_service_default($weights) {
|
||||
validate_legacy(Hash, 'validate_hash', $weights)
|
||||
|
@ -376,12 +376,12 @@ class watcher (
|
||||
$zmq_target_expire = undef,
|
||||
) {
|
||||
|
||||
include ::openstacklib::openstackclient
|
||||
include openstacklib::openstackclient
|
||||
|
||||
include ::watcher::deps
|
||||
include ::watcher::params
|
||||
include ::watcher::policy
|
||||
include ::watcher::db
|
||||
include watcher::deps
|
||||
include watcher::params
|
||||
include watcher::policy
|
||||
include watcher::db
|
||||
|
||||
package { 'watcher':
|
||||
ensure => $package_ensure,
|
||||
|
@ -79,7 +79,7 @@ class watcher::keystone::auth (
|
||||
$internal_url = 'http://127.0.0.1:9322',
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
$real_service_name = pick($service_name, $auth_name)
|
||||
|
||||
|
@ -205,7 +205,7 @@ class watcher::keystone::authtoken (
|
||||
$service_token_roles_required = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
if is_service_default($password) and ! $::watcher::api::watcher_client_password {
|
||||
fail('Please set password for watcher service user')
|
||||
|
@ -123,7 +123,7 @@ class watcher::logging(
|
||||
$log_date_format = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include watcher::deps
|
||||
|
||||
oslo::log { 'watcher_config':
|
||||
use_stderr => $use_stderr,
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Parameters for puppet-watcher
|
||||
#
|
||||
class watcher::params {
|
||||
include ::openstacklib::defaults
|
||||
include openstacklib::defaults
|
||||
|
||||
$pyvers = $::openstacklib::defaults::pyvers
|
||||
$pyver3 = $::openstacklib::defaults::pyver3
|
||||
|
@ -28,8 +28,8 @@ class watcher::policy (
|
||||
$policy_path = '/etc/watcher/policy.json',
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include ::watcher::params
|
||||
include watcher::deps
|
||||
include watcher::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
|
@ -119,12 +119,12 @@ class watcher::wsgi::apache (
|
||||
$custom_wsgi_process_options = {},
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
include ::watcher::params
|
||||
include ::apache
|
||||
include ::apache::mod::wsgi
|
||||
include watcher::deps
|
||||
include watcher::params
|
||||
include apache
|
||||
include apache::mod::wsgi
|
||||
if $ssl {
|
||||
include ::apache::mod::ssl
|
||||
include apache::mod::ssl
|
||||
}
|
||||
|
||||
::openstacklib::wsgi::apache { 'watcher_wsgi':
|
||||
|
@ -6,16 +6,16 @@ describe 'basic watcher' 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
|
||||
include openstack_integration::repos
|
||||
include openstack_integration::rabbitmq
|
||||
include openstack_integration::mysql
|
||||
include openstack_integration::keystone
|
||||
|
||||
# TODO(aschultz): fix after Ubuntu ocata-m3/rc1. watcher-db-manage is
|
||||
# broken
|
||||
if ($::osfamily == 'RedHat') {
|
||||
include ::openstack_integration::watcher
|
||||
include openstack_integration::watcher
|
||||
}
|
||||
EOS
|
||||
|
||||
|
@ -145,10 +145,10 @@ describe 'watcher::api' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
include ::watcher::db
|
||||
"include apache
|
||||
include watcher::db
|
||||
class { 'watcher': }
|
||||
class { '::watcher::keystone::authtoken':
|
||||
class { 'watcher::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}"
|
||||
end
|
||||
@ -171,10 +171,10 @@ describe 'watcher::api' do
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
include ::watcher::db
|
||||
"include apache
|
||||
include watcher::db
|
||||
class { 'watcher': }
|
||||
class { '::watcher::keystone::authtoken':
|
||||
class { 'watcher::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user