diff --git a/examples/vitrage.pp b/examples/vitrage.pp index 4761f1b..3fc6c58 100644 --- a/examples/vitrage.pp +++ b/examples/vitrage.pp @@ -1,23 +1,23 @@ -class { '::vitrage::keystone::auth': +class { 'vitrage::keystone::auth': admin_url => 'http://127.0.0.1:8999', internal_url => 'http://127.0.0.1:8999', public_url => 'http://127.0.0.1:8999', password => 'a_big_secret', } -class { '::vitrage': } -class { '::vitrage::api': +class { 'vitrage': } +class { 'vitrage::api': enabled => true, keystone_password => 'a_big_secret', keystone_identity_uri => 'http://127.0.0.1:5000/', service_name => 'httpd', } -include ::apache -class { '::vitrage::wsgi::apache': +include apache +class { 'vitrage::wsgi::apache': ssl => false, } -class { '::vitrage::auth': +class { 'vitrage::auth': auth_password => 'a_big_secret', } -class { '::vitrage::graph': } -class { '::vitrage::notifier': } -class { '::vitrage::client': } +class { 'vitrage::graph': } +class { 'vitrage::notifier': } +class { 'vitrage::client': } diff --git a/manifests/api.pp b/manifests/api.pp index 80233e6..c87f6ec 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -51,9 +51,9 @@ class vitrage::api ( $max_request_body_size = $::os_service_default, ) inherits vitrage::params { - include ::vitrage::deps - include ::vitrage::params - include ::vitrage::policy + include vitrage::deps + include vitrage::params + include vitrage::policy package { 'vitrage-api': ensure => $package_ensure, @@ -79,7 +79,7 @@ class vitrage::api ( tag => 'vitrage-service', } } elsif $service_name == 'httpd' { - include ::apache::params + include apache::params service { 'vitrage-api': ensure => 'stopped', name => $::vitrage::params::api_service_name, diff --git a/manifests/auth.pp b/manifests/auth.pp index 1cbd38a..7ed38ce 100644 --- a/manifests/auth.pp +++ b/manifests/auth.pp @@ -60,7 +60,7 @@ class vitrage::auth ( $auth_endpoint_type = $::os_service_default, ) { - include ::vitrage::deps + include vitrage::deps vitrage_config { 'service_credentials/auth_url' : value => $auth_url; diff --git a/manifests/client.pp b/manifests/client.pp index 690e975..66eeec1 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -10,8 +10,8 @@ class vitrage::client ( $ensure = 'present' ) { - include ::vitrage::deps - include ::vitrage::params + include vitrage::deps + include vitrage::params package { 'python-vitrageclient': ensure => $ensure, diff --git a/manifests/config.pp b/manifests/config.pp index c64efc9..786bfda 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -28,7 +28,7 @@ class vitrage::config ( $vitrage_api_paste_ini = {}, ) { - include ::vitrage::deps + include vitrage::deps validate_legacy(Hash, 'validate_hash', $vitrage_config) validate_legacy(Hash, 'validate_hash', $vitrage_api_paste_ini) diff --git a/manifests/db.pp b/manifests/db.pp index 81ad887..1d387ed 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -62,7 +62,7 @@ class vitrage::db ( $database_idle_timeout = undef, ) { - include ::vitrage::deps + include vitrage::deps if $database_idle_timeout { warning('The database_idle_timeout parameter is deprecated. Please use \ diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index ff04f4d..2267b38 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -43,7 +43,7 @@ class vitrage::db::mysql( $allowed_hosts = undef ) { - include ::vitrage::deps + include vitrage::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index e68709e..e3056de 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -32,7 +32,7 @@ class vitrage::db::postgresql( $privileges = 'ALL', ) { - include ::vitrage::deps + include vitrage::deps ::openstacklib::db::postgresql { 'vitrage': password_hash => postgresql_password($user, $password), diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index c8ec2df..74380fc 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -12,7 +12,7 @@ class vitrage::db::sync( $extra_params = undef, ) { - include ::vitrage::deps + include vitrage::deps exec { 'vitrage-db-sync': command => "vitrage-dbsync ${extra_params}", diff --git a/manifests/graph.pp b/manifests/graph.pp index 8148e55..5b18d2b 100644 --- a/manifests/graph.pp +++ b/manifests/graph.pp @@ -19,8 +19,8 @@ class vitrage::graph ( $package_ensure = 'present', ) { - include ::vitrage::deps - include ::vitrage::params + include vitrage::deps + include vitrage::params ensure_resource( 'package', [$::vitrage::params::graph_package_name], { ensure => $package_ensure, diff --git a/manifests/init.pp b/manifests/init.pp index 04f9dba..7c77e47 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -230,7 +230,7 @@ class vitrage ( $types = $::os_service_default, ) inherits vitrage::params { - include ::vitrage::deps + include vitrage::deps package { 'vitrage': ensure => $package_ensure, diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6c18818..ac8c258 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -79,7 +79,7 @@ class vitrage::keystone::auth ( $admin_url = 'http://127.0.0.1:8999', ) { - include ::vitrage::deps + include vitrage::deps $real_service_name = pick($service_name, $auth_name) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index ab76d34..15021a9 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -202,7 +202,7 @@ class vitrage::keystone::authtoken( $service_token_roles_required = $::os_service_default, ) { - include ::vitrage::deps + include vitrage::deps keystone::resource::authtoken { 'vitrage_config': username => $username, diff --git a/manifests/logging.pp b/manifests/logging.pp index 849643c..755d974 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -121,7 +121,7 @@ class vitrage::logging( $log_date_format = $::os_service_default, ) { - include ::vitrage::deps + include vitrage::deps oslo::log { 'vitrage_config': debug => $debug, diff --git a/manifests/notifier.pp b/manifests/notifier.pp index 9a5b997..f410da5 100644 --- a/manifests/notifier.pp +++ b/manifests/notifier.pp @@ -24,8 +24,8 @@ class vitrage::notifier ( $notifiers = $::os_service_default, ) { - include ::vitrage::deps - include ::vitrage::params + include vitrage::deps + include vitrage::params if !is_service_default($notifiers) { $notifiers_orig = join(any2array($notifiers), ',') diff --git a/manifests/params.pp b/manifests/params.pp index 27a80b8..50a2228 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,7 @@ # Parameters for puppet-vitrage # class vitrage::params { - include ::openstacklib::defaults + include openstacklib::defaults $pyvers = $::openstacklib::defaults::pyvers $client_package_name = "python${pyvers}-vitrageclient" diff --git a/manifests/persistor.pp b/manifests/persistor.pp index 72ca184..5078c97 100644 --- a/manifests/persistor.pp +++ b/manifests/persistor.pp @@ -19,8 +19,8 @@ class vitrage::persistor ( $package_ensure = 'present', ) { - include ::vitrage::deps - include ::vitrage::params + include vitrage::deps + include vitrage::params ensure_resource( 'package', [$::vitrage::params::persistor_package_name], { ensure => $package_ensure, diff --git a/manifests/policy.pp b/manifests/policy.pp index 84edd79..62c15be 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -28,8 +28,8 @@ class vitrage::policy ( $policy_path = '/etc/vitrage/policy.json', ) { - include ::vitrage::deps - include ::vitrage::params + include vitrage::deps + include vitrage::params validate_legacy(Hash, 'validate_hash', $policies) diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 4740ddf..b47b042 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -124,12 +124,12 @@ class vitrage::wsgi::apache ( $custom_wsgi_process_options = {}, ) { - include ::vitrage::deps - include ::vitrage::params - include ::apache - include ::apache::mod::wsgi + include vitrage::deps + include vitrage::params + include apache + include apache::mod::wsgi if $ssl { - include ::apache::mod::ssl + include apache::mod::ssl } ::openstacklib::wsgi::apache { 'vitrage_wsgi': diff --git a/spec/acceptance/vitrage_wsgi_apache_spec.rb b/spec/acceptance/vitrage_wsgi_apache_spec.rb index 0457d2a..6a38411 100644 --- a/spec/acceptance/vitrage_wsgi_apache_spec.rb +++ b/spec/acceptance/vitrage_wsgi_apache_spec.rb @@ -6,11 +6,11 @@ describe 'basic vitrage' 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 case $::osfamily { 'Debian': { @@ -23,7 +23,7 @@ describe 'basic vitrage' do package { 'python2-cotyledon': ensure => present, } - include ::openstack_integration::vitrage + include openstack_integration::vitrage } default: { fail("Unsupported osfamily (${::osfamily})") diff --git a/spec/classes/vitrage_api_spec.rb b/spec/classes/vitrage_api_spec.rb index 5ce74af..9296004 100644 --- a/spec/classes/vitrage_api_spec.rb +++ b/spec/classes/vitrage_api_spec.rb @@ -4,7 +4,7 @@ describe 'vitrage::api' do let :pre_condition do "class { 'vitrage': } - class { '::vitrage::keystone::authtoken': + class { 'vitrage::keystone::authtoken': password => 'a_big_secret', }" end @@ -107,9 +107,9 @@ describe 'vitrage::api' do end let :pre_condition do - "include ::apache + "include apache class { 'vitrage': } - class { '::vitrage::keystone::authtoken': + class { 'vitrage::keystone::authtoken': password => 'a_big_secret', }" end @@ -130,9 +130,9 @@ describe 'vitrage::api' do end let :pre_condition do - "include ::apache + "include apache class { 'vitrage': } - class { '::vitrage::keystone::authtoken': + class { 'vitrage::keystone::authtoken': password => 'a_big_secret', }" end diff --git a/spec/classes/vitrage_graph_spec.rb b/spec/classes/vitrage_graph_spec.rb index 88567ab..209de16 100644 --- a/spec/classes/vitrage_graph_spec.rb +++ b/spec/classes/vitrage_graph_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'vitrage::graph' do let :pre_condition do - "class { '::vitrage': }" + "class { 'vitrage': }" end shared_examples_for 'vitrage-graph' do diff --git a/spec/classes/vitrage_notifier_spec.rb b/spec/classes/vitrage_notifier_spec.rb index 2a34100..82726ed 100644 --- a/spec/classes/vitrage_notifier_spec.rb +++ b/spec/classes/vitrage_notifier_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'vitrage::notifier' do let :pre_condition do - "class { '::vitrage': }" + "class { 'vitrage': }" end shared_examples_for 'vitrage-notifier' do diff --git a/spec/classes/vitrage_persistor_spec.rb b/spec/classes/vitrage_persistor_spec.rb index 79b7c6e..e78a155 100644 --- a/spec/classes/vitrage_persistor_spec.rb +++ b/spec/classes/vitrage_persistor_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'vitrage::persistor' do let :pre_condition do - "class { '::vitrage': }" + "class { 'vitrage': }" end shared_examples_for 'vitrage-persistor' do