diff --git a/examples/magnum.pp b/examples/magnum.pp index 168793a..ca15798 100644 --- a/examples/magnum.pp +++ b/examples/magnum.pp @@ -15,46 +15,46 @@ require => Class['::rabbitmq'], } - class { '::magnum::db::mysql': + class { 'magnum::db::mysql': password => 'magnum', } - class { '::magnum::db': + class { 'magnum::db': database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum', } - class { '::magnum::keystone::domain': + class { 'magnum::keystone::domain': domain_password => 'oh_my_no_secret', } - class { '::magnum::keystone::authtoken': + class { 'magnum::keystone::authtoken': password => 'a_big_secret', } - class { '::magnum::api': + class { 'magnum::api': host => '127.0.0.1', } - class { '::magnum::keystone::auth': + class { 'magnum::keystone::auth': password => 'a_big_secret', public_url => 'http://127.0.0.1:9511/v1', internal_url => 'http://127.0.0.1:9511/v1', admin_url => 'http://127.0.0.1:9511/v1', } - class { '::magnum': + class { 'magnum': default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672', rabbit_use_ssl => false, notification_driver => 'messagingv2', } - class { '::magnum::conductor': + class { 'magnum::conductor': } - class { '::magnum::client': + class { 'magnum::client': } - class { '::magnum::certificates': + class { 'magnum::certificates': cert_manager_type => 'local' } diff --git a/manifests/api.pp b/manifests/api.pp index aad5a45..fc99a31 100755 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -80,9 +80,9 @@ class magnum::api( $workers = $::os_workers, ) inherits magnum::params { - include ::magnum::deps - include ::magnum::params - include ::magnum::policy + include magnum::deps + include magnum::params + include magnum::policy if $enabled_ssl { if is_service_default($ssl_cert_file) { @@ -94,7 +94,7 @@ class magnum::api( } if $sync_db { - include ::magnum::db::sync + include magnum::db::sync } # Configure API conf @@ -133,7 +133,7 @@ class magnum::api( tag => ['magnum-service', 'magnum-db-sync-service'], } } elsif $service_name == 'httpd' { - include ::apache::params + include apache::params service { 'magnum-api': ensure => 'stopped', name => $::magnum::params::api_service, @@ -147,6 +147,6 @@ class magnum::api( } if $auth_strategy == 'keystone' { - include ::magnum::keystone::authtoken + include magnum::keystone::authtoken } } diff --git a/manifests/certificates.pp b/manifests/certificates.pp index f1a56a3..688fb0e 100644 --- a/manifests/certificates.pp +++ b/manifests/certificates.pp @@ -12,7 +12,7 @@ class magnum::certificates ( $cert_manager_type = $::os_service_default, ) { - include ::magnum::deps + include magnum::deps magnum_config { 'certificates/cert_manager_type': value => $cert_manager_type; diff --git a/manifests/client.pp b/manifests/client.pp index e46983f..8465989 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -12,8 +12,8 @@ class magnum::client ( $package_ensure = 'present' ) { - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params package { 'python-magnumclient': ensure => $package_ensure, diff --git a/manifests/clients.pp b/manifests/clients.pp index a83b613..1942f8a 100644 --- a/manifests/clients.pp +++ b/manifests/clients.pp @@ -38,13 +38,13 @@ class magnum::clients ( $key_file = $::os_service_default, $insecure = false ) { - include ::magnum::deps - include ::magnum::params - include ::magnum::clients::barbican - include ::magnum::clients::cinder - include ::magnum::clients::glance - include ::magnum::clients::heat - include ::magnum::clients::magnum - include ::magnum::clients::neutron - include ::magnum::clients::nova + include magnum::deps + include magnum::params + include magnum::clients::barbican + include magnum::clients::cinder + include magnum::clients::glance + include magnum::clients::heat + include magnum::clients::magnum + include magnum::clients::neutron + include magnum::clients::nova } diff --git a/manifests/clients/barbican.pp b/manifests/clients/barbican.pp index d92efa0..b0f63b9 100644 --- a/manifests/clients/barbican.pp +++ b/manifests/clients/barbican.pp @@ -19,8 +19,8 @@ class magnum::clients::barbican( $endpoint_type = $magnum::clients::endpoint_type, ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'barbican_client/region_name': value => $region_name; diff --git a/manifests/clients/cinder.pp b/manifests/clients/cinder.pp index b9854af..ac348f1 100644 --- a/manifests/clients/cinder.pp +++ b/manifests/clients/cinder.pp @@ -13,8 +13,8 @@ class magnum::clients::cinder( $region_name = $magnum::clients::region_name, ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'cinder_client/region_name': value => $region_name; diff --git a/manifests/clients/glance.pp b/manifests/clients/glance.pp index 2bd3db5..0199f29 100644 --- a/manifests/clients/glance.pp +++ b/manifests/clients/glance.pp @@ -45,8 +45,8 @@ class magnum::clients::glance( $insecure = $magnum::clients::insecure ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'glance_client/region_name': value => $region_name; diff --git a/manifests/clients/heat.pp b/manifests/clients/heat.pp index 6ee99c0..e52d696 100644 --- a/manifests/clients/heat.pp +++ b/manifests/clients/heat.pp @@ -45,8 +45,8 @@ class magnum::clients::heat( $insecure = $magnum::clients::insecure ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'heat_client/region_name': value => $region_name; diff --git a/manifests/clients/magnum.pp b/manifests/clients/magnum.pp index c3ec388..be1b4bb 100644 --- a/manifests/clients/magnum.pp +++ b/manifests/clients/magnum.pp @@ -19,8 +19,8 @@ class magnum::clients::magnum( $endpoint_type = $magnum::clients::endpoint_type, ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'magnum_client/region_name': value => $region_name; diff --git a/manifests/clients/neutron.pp b/manifests/clients/neutron.pp index 2041778..eb4492d 100644 --- a/manifests/clients/neutron.pp +++ b/manifests/clients/neutron.pp @@ -39,8 +39,8 @@ class magnum::clients::neutron( $insecure = $magnum::clients::insecure ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'neutron_client/region_name': value => $region_name; diff --git a/manifests/clients/nova.pp b/manifests/clients/nova.pp index e2568d0..dade96a 100644 --- a/manifests/clients/nova.pp +++ b/manifests/clients/nova.pp @@ -45,8 +45,8 @@ class magnum::clients::nova( $insecure = $magnum::clients::insecure ){ - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params magnum_config { 'nova_client/region_name': value => $region_name; diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 5d88acf..07cca4d 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -38,9 +38,9 @@ class magnum::conductor( $workers = $::os_workers, ) { - include ::magnum::db - include ::magnum::deps - include ::magnum::params + include magnum::db + include magnum::deps + include magnum::params # Install package package { 'magnum-conductor': @@ -72,6 +72,6 @@ class magnum::conductor( } if $auth_strategy == 'keystone' { - include ::magnum::keystone::authtoken + include magnum::keystone::authtoken } } diff --git a/manifests/config.pp b/manifests/config.pp index c203f03..88c8bda 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -28,7 +28,7 @@ class magnum::config ( $magnum_api_paste_ini = {}, ) { - include ::magnum::deps + include magnum::deps validate_legacy(Hash, 'validate_hash', $magnum_config) validate_legacy(Hash, 'validate_hash', $magnum_api_paste_ini) diff --git a/manifests/db.pp b/manifests/db.pp index 2252ec4..be90201 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -62,7 +62,7 @@ class magnum::db ( $database_idle_timeout = undef, ) { - include ::magnum::deps + include magnum::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 08530ee..45ce0bc 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -43,7 +43,7 @@ class magnum::db::mysql( $allowed_hosts = undef ) { - include ::magnum::deps + include magnum::deps validate_legacy(String, 'validate_string', $password) diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 0508e98..cda5120 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -32,7 +32,7 @@ class magnum::db::postgresql( $privileges = 'ALL', ) { - include ::magnum::deps + include magnum::deps ::openstacklib::db::postgresql { 'magnum': password_hash => postgresql_password($user, $password), diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 0c4cedb..32077bb 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -22,7 +22,7 @@ class magnum::db::sync( $exec_path = '/usr/bin', ) { - include ::magnum::deps + include magnum::deps exec { 'magnum-db-sync': command => "magnum-db-manage ${extra_params} upgrade head", diff --git a/manifests/init.pp b/manifests/init.pp index 841e68a..e3431a1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -220,10 +220,10 @@ class magnum( $purge_config = false, ) { - include ::magnum::deps - include ::magnum::params - include ::magnum::policy - include ::magnum::db + include magnum::deps + include magnum::params + include magnum::policy + include magnum::db package { 'magnum-common': ensure => $package_ensure, diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index a8dc65b..407b9f9 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -78,7 +78,7 @@ class magnum::keystone::auth ( $internal_url = 'http://127.0.0.1:9511/v1', ) { - include ::magnum::deps + include magnum::deps $real_service_name = pick($service_name, $auth_name) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 4c08fb0..86648eb 100755 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -202,7 +202,7 @@ class magnum::keystone::authtoken( $service_token_roles_required = $::os_service_default, ) { - include ::magnum::deps + include magnum::deps if is_service_default($password) { fail('Please set password for magnum service user') diff --git a/manifests/keystone/domain.pp b/manifests/keystone/domain.pp index 3fa17fa..2fa9e7f 100644 --- a/manifests/keystone/domain.pp +++ b/manifests/keystone/domain.pp @@ -79,8 +79,8 @@ class magnum::keystone::domain ( $keystone_interface = 'public' ) { - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params if $manage_domain { ensure_resource('keystone_domain', $domain_name, { diff --git a/manifests/logging.pp b/manifests/logging.pp index 6719f3c..b03bf67 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -123,7 +123,7 @@ class magnum::logging( $log_date_format = $::os_service_default, ) { - include ::magnum::deps + include magnum::deps oslo::log { 'magnum_config': debug => $debug, diff --git a/manifests/params.pp b/manifests/params.pp index cbc927c..08f12bd 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,7 @@ # Parameters for puppet-magnum # class magnum::params { - include ::openstacklib::defaults + include openstacklib::defaults $pyvers = $::openstacklib::defaults::pyvers $pyver3 = $::openstacklib::defaults::pyver3 diff --git a/manifests/policy.pp b/manifests/policy.pp index 7971f6c..9e2f57e 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -28,8 +28,8 @@ class magnum::policy ( $policy_path = '/etc/magnum/policy.json', ) { - include ::magnum::deps - include ::magnum::params + include magnum::deps + include magnum::params validate_legacy(Hash, 'validate_hash', $policies) diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 3ac4da5..2f52428 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -115,12 +115,12 @@ class magnum::wsgi::apache ( $custom_wsgi_process_options = {}, ) { - include ::magnum::deps - include ::magnum::params - include ::apache - include ::apache::mod::wsgi + include magnum::deps + include magnum::params + include apache + include apache::mod::wsgi if $ssl { - include ::apache::mod::ssl + include apache::mod::ssl } ::openstacklib::wsgi::apache { 'magnum_wsgi': bind_host => $bind_host, diff --git a/spec/acceptance/basic_magnum_spec.rb b/spec/acceptance/basic_magnum_spec.rb index 51d4a90..247f38e 100755 --- a/spec/acceptance/basic_magnum_spec.rb +++ b/spec/acceptance/basic_magnum_spec.rb @@ -6,11 +6,11 @@ describe 'basic magnum' 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 rabbitmq_vhost { '/magnum': provider => 'rabbitmqctl', @@ -31,53 +31,53 @@ describe 'basic magnum' do } # Magnum resources - class { '::magnum::keystone::auth': + class { 'magnum::keystone::auth': password => 'a_big_secret', public_url => 'http://127.0.0.1:9511/v1', internal_url => 'http://127.0.0.1:9511/v1', admin_url => 'http://127.0.0.1:9511/v1', } - class { '::magnum::keystone::authtoken': + class { 'magnum::keystone::authtoken': password => 'a_big_secret', } - class { '::magnum::db::mysql': + class { 'magnum::db::mysql': password => 'magnum', } - class { '::magnum::logging': + class { 'magnum::logging': debug => true, } - class { '::magnum::db': + class { 'magnum::db': database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum', } - class { '::magnum::keystone::domain': + class { 'magnum::keystone::domain': domain_password => 'oh_my_no_secret', } - class { '::magnum': + class { 'magnum': default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672/', rabbit_use_ssl => false, notification_driver => 'messagingv2', } - class { '::magnum::api': + class { 'magnum::api': service_name => 'httpd', } - include ::apache - include ::magnum::wsgi::apache + include apache + include magnum::wsgi::apache - class { '::magnum::conductor': } - class { '::magnum::client': } + class { 'magnum::conductor': } + class { 'magnum::client': } - class { '::magnum::certificates': + class { 'magnum::certificates': cert_manager_type => 'local' } - class { '::magnum::clients': } + class { 'magnum::clients': } EOS # Run it twice to test for idempotency apply_manifest(pp, :catch_failures => true) diff --git a/spec/classes/magnum_api_spec.rb b/spec/classes/magnum_api_spec.rb index ce42416..96e5986 100755 --- a/spec/classes/magnum_api_spec.rb +++ b/spec/classes/magnum_api_spec.rb @@ -95,11 +95,11 @@ describe 'magnum::api' do shared_examples 'magnum-api wsgi' do let :pre_condition do - "include ::magnum + "include magnum class { 'magnum::keystone::authtoken': password => 'secret', } - include ::apache" + include apache" end let :params do