Browse Source

Convert all class usage to relative names

Change-Id: Ie5227ac581af00f445f71b2aaa05e6d1d8363324
changes/34/697934/1
Tobias Urdin 2 years ago
parent
commit
5f2875f245
20 changed files with 47 additions and 47 deletions
  1. +1
    -1
      examples/init.pp
  2. +6
    -6
      manifests/api.pp
  3. +2
    -2
      manifests/applier.pp
  4. +2
    -2
      manifests/client.pp
  5. +1
    -1
      manifests/config.pp
  6. +1
    -1
      manifests/db.pp
  7. +1
    -1
      manifests/db/create_schema.pp
  8. +1
    -1
      manifests/db/mysql.pp
  9. +1
    -1
      manifests/db/postgresql.pp
  10. +1
    -1
      manifests/db/upgrade.pp
  11. +2
    -2
      manifests/decision_engine.pp
  12. +5
    -5
      manifests/init.pp
  13. +1
    -1
      manifests/keystone/auth.pp
  14. +1
    -1
      manifests/keystone/authtoken.pp
  15. +1
    -1
      manifests/logging.pp
  16. +1
    -1
      manifests/params.pp
  17. +2
    -2
      manifests/policy.pp
  18. +5
    -5
      manifests/wsgi/apache.pp
  19. +6
    -6
      spec/acceptance/watcher_wsgi_apache_spec.rb
  20. +6
    -6
      spec/classes/watcher_api_spec.rb

+ 1
- 1
examples/init.pp View File

@ -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

+ 6
- 6
manifests/api.pp View File

@ -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,


+ 2
- 2
manifests/applier.pp View File

@ -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,


+ 2
- 2
manifests/client.pp View File

@ -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,


+ 1
- 1
manifests/config.pp View File

@ -24,7 +24,7 @@ class watcher::config (
$watcher_config = {},
) {
include ::watcher::deps
include watcher::deps
validate_legacy(Hash, 'validate_hash', $watcher_config)


+ 1
- 1
manifests/db.pp View File

@ -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 \


+ 1
- 1
manifests/db/create_schema.pp View File

@ -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",


+ 1
- 1
manifests/db/mysql.pp View File

@ -43,7 +43,7 @@ class watcher::db::mysql(
$allowed_hosts = undef
) {
include ::watcher::deps
include watcher::deps
validate_legacy(String, 'validate_string', $password)


+ 1
- 1
manifests/db/postgresql.pp View File

@ -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),


+ 1
- 1
manifests/db/upgrade.pp View File

@ -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",


+ 2
- 2
manifests/decision_engine.pp View File

@ -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)


+ 5
- 5
manifests/init.pp View File

@ -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,


+ 1
- 1
manifests/keystone/auth.pp View File

@ -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)


+ 1
- 1
manifests/keystone/authtoken.pp View File

@ -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')


+ 1
- 1
manifests/logging.pp View File

@ -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
- 1
manifests/params.pp View File

@ -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


+ 2
- 2
manifests/policy.pp View File

@ -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)


+ 5
- 5
manifests/wsgi/apache.pp View File

@ -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
- 6
spec/acceptance/watcher_wsgi_apache_spec.rb View File

@ -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


+ 6
- 6
spec/classes/watcher_api_spec.rb View File

@ -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…
Cancel
Save