diff --git a/Rakefile b/Rakefile index 0c911f26e..168d10814 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.fail_on_warnings = true -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetSyntax.fail_on_deprecation_notices = false +require 'puppet-openstack_spec_helper/rake_tasks' diff --git a/manifests/aodh.pp b/manifests/aodh.pp index 784cd4c49..62758ecaa 100644 --- a/manifests/aodh.pp +++ b/manifests/aodh.pp @@ -7,7 +7,6 @@ class openstack_integration::aodh ( $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params @@ -111,5 +110,4 @@ class openstack_integration::aodh ( workers => 2, } class { 'aodh::expirer': } - } diff --git a/manifests/apache.pp b/manifests/apache.pp index be7a86130..f1fe2ca21 100644 --- a/manifests/apache.pp +++ b/manifests/apache.pp @@ -1,5 +1,4 @@ class openstack_integration::apache { - include openstack_integration::params include openstack_integration::config class { 'apache': diff --git a/manifests/barbican.pp b/manifests/barbican.pp index 2a7392818..5ea61aa59 100644 --- a/manifests/barbican.pp +++ b/manifests/barbican.pp @@ -1,5 +1,4 @@ class openstack_integration::barbican { - include openstack_integration::config include openstack_integration::params @@ -90,5 +89,4 @@ class openstack_integration::barbican { class { 'barbican::plugins::simple_crypto': simple_crypto_plugin_kek => 'dGhpcnR5X3R3b19ieXRlX2tleWJsYWhibGFoYmxhaGg=', } - } diff --git a/manifests/bind.pp b/manifests/bind.pp index 7ce66e066..0a28f2922 100644 --- a/manifests/bind.pp +++ b/manifests/bind.pp @@ -2,7 +2,6 @@ # class openstack_integration::bind { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/cacert.pp b/manifests/cacert.pp index 0945e49c0..687f533ad 100644 --- a/manifests/cacert.pp +++ b/manifests/cacert.pp @@ -1,5 +1,4 @@ class openstack_integration::cacert { - include openstack_integration::params include openstack_integration::config @@ -17,5 +16,4 @@ class openstack_integration::cacert { subscribe => File[$openstack_integration::params::cert_path], refreshonly => true, } - } diff --git a/manifests/ceilometer.pp b/manifests/ceilometer.pp index 97c042bad..382fe0e2d 100644 --- a/manifests/ceilometer.pp +++ b/manifests/ceilometer.pp @@ -11,8 +11,7 @@ class openstack_integration::ceilometer ( $integration_enable = true, $separate_polling = false, -){ - +) { include openstack_integration::config include openstack_integration::params @@ -105,5 +104,4 @@ class openstack_integration::ceilometer ( password => 'a_big_secret', auth_url => $openstack_integration::config::keystone_auth_uri, } - } diff --git a/manifests/ceph.pp b/manifests/ceph.pp index 0b2ee368b..c9c5c0220 100644 --- a/manifests/ceph.pp +++ b/manifests/ceph.pp @@ -23,7 +23,6 @@ class openstack_integration::ceph ( $create_cephfs = false, $ceph_pools = ['glance', 'nova'] ) { - include openstack_integration::config if $openstack_integration::config::ipv6 { @@ -34,7 +33,7 @@ class openstack_integration::ceph ( $ms_bind_ipv6 = false } - stdlib::ensure_packages(['lvm2'], {'ensure' => 'present', before => Exec['lvm_create']}) + stdlib::ensure_packages(['lvm2'], { before => Exec['lvm_create'] }) exec { 'lvm_create': command => "/bin/true # comment to satisfy puppet syntax requirements diff --git a/manifests/cinder.pp b/manifests/cinder.pp index 98a795191..1c97794e5 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -24,7 +24,6 @@ class openstack_integration::cinder ( $cinder_backup = undef, $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/cloudkitty.pp b/manifests/cloudkitty.pp index 4ac212c8f..fa40f317f 100644 --- a/manifests/cloudkitty.pp +++ b/manifests/cloudkitty.pp @@ -1,8 +1,6 @@ # Configure the cloudkitty service # -class openstack_integration::cloudkitty ( -) { - +class openstack_integration::cloudkitty { include openstack_integration::config include openstack_integration::params diff --git a/manifests/config.pp b/manifests/config.pp index f2fdac434..634577f57 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -32,7 +32,6 @@ class openstack_integration::config ( $cache_backend = 'memcached', $tooz_backend = 'redis', ) { - include openstack_integration::params $messaging_default_proto = $rpc_backend diff --git a/manifests/designate.pp b/manifests/designate.pp index 37238d925..6208a1dfb 100644 --- a/manifests/designate.pp +++ b/manifests/designate.pp @@ -7,7 +7,6 @@ class openstack_integration::designate ( $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params include openstack_integration::bind diff --git a/manifests/glance.pp b/manifests/glance.pp index a0feeced2..c44c0b6bb 100644 --- a/manifests/glance.pp +++ b/manifests/glance.pp @@ -18,7 +18,6 @@ class openstack_integration::glance ( $image_encryption = false, $show_multiple_locations = undef, ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/gnocchi.pp b/manifests/gnocchi.pp index 2e96605ea..eabf01304 100644 --- a/manifests/gnocchi.pp +++ b/manifests/gnocchi.pp @@ -6,8 +6,7 @@ # class openstack_integration::gnocchi ( $backend = 'file', -){ - +) { include openstack_integration::config include openstack_integration::params @@ -135,5 +134,4 @@ class openstack_integration::gnocchi ( # random datas: resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9', } - } diff --git a/manifests/heat.pp b/manifests/heat.pp index d8d0d01de..def2dfacd 100644 --- a/manifests/heat.pp +++ b/manifests/heat.pp @@ -7,7 +7,6 @@ class openstack_integration::heat ( $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params @@ -114,7 +113,7 @@ class openstack_integration::heat ( workers => 2, } class { 'heat::engine': - num_engine_workers => 2, + num_engine_workers => 2, auth_encryption_key => '1234567890AZERTYUIOPMLKJHGFDSQ12', heat_metadata_server_url => "${openstack_integration::config::base_url}:8000", heat_waitcondition_server_url => "${openstack_integration::config::base_url}:8000/v1/waitcondition", @@ -130,5 +129,4 @@ class openstack_integration::heat ( workers => 2, } class { 'heat::cron::purge_deleted': } - } diff --git a/manifests/horizon.pp b/manifests/horizon.pp index 51c5a3c3a..7c7339645 100644 --- a/manifests/horizon.pp +++ b/manifests/horizon.pp @@ -42,7 +42,6 @@ class openstack_integration::horizon ( $octavia_enabled = false, $designate_enabled = false, ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/init.pp b/manifests/init.pp index 6e3426dac..e8d86ebfc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,4 @@ class openstack_integration { - Exec { logoutput => 'on_failure' } if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/ironic.pp b/manifests/ironic.pp index 725577735..9d7c0c1c4 100644 --- a/manifests/ironic.pp +++ b/manifests/ironic.pp @@ -17,7 +17,6 @@ class openstack_integration::ironic ( $inspector_backend = 'database', $send_power_notifications = false, ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/keystone.pp b/manifests/keystone.pp index a085c6882..657a417e6 100644 --- a/manifests/keystone.pp +++ b/manifests/keystone.pp @@ -15,13 +15,11 @@ # (optional) Define the token expiration to use. # Default to '600'. # - class openstack_integration::keystone ( $default_domain = undef, $using_domain_config = false, $token_expiration = '600', ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/magnum.pp b/manifests/magnum.pp index f91921ed6..56264f8ef 100644 --- a/manifests/magnum.pp +++ b/manifests/magnum.pp @@ -5,11 +5,9 @@ # Can be 'barbican', 'x509keypair' or 'local'. # Defaults to 'barbican'. # - class openstack_integration::magnum ( $cert_manager_type = 'barbican' ) { - include openstack_integration::config include openstack_integration::params @@ -116,5 +114,4 @@ class openstack_integration::magnum ( cert_manager_type => $cert_manager_type, } class { 'magnum::clients': } - } diff --git a/manifests/manila.pp b/manifests/manila.pp index 1cd7040a3..350a70c3c 100644 --- a/manifests/manila.pp +++ b/manifests/manila.pp @@ -13,7 +13,6 @@ class openstack_integration::manila ( $backend = 'lvm', $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/mistral.pp b/manifests/mistral.pp index 7b102fe81..8335a1a62 100644 --- a/manifests/mistral.pp +++ b/manifests/mistral.pp @@ -1,5 +1,4 @@ class openstack_integration::mistral { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/mq_user.pp b/manifests/mq_user.pp index 6754ae4d4..be95867c3 100644 --- a/manifests/mq_user.pp +++ b/manifests/mq_user.pp @@ -16,7 +16,6 @@ define openstack_integration::mq_user ( $admin = true, $vhost = '/', ) { - include openstack_integration::config include openstack_integration::rabbitmq diff --git a/manifests/mysql.pp b/manifests/mysql.pp index 0fc844d57..65ebea4aa 100644 --- a/manifests/mysql.pp +++ b/manifests/mysql.pp @@ -1,5 +1,4 @@ class openstack_integration::mysql { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/neutron.pp b/manifests/neutron.pp index 201ab87fb..11f783e01 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -58,7 +58,6 @@ class openstack_integration::neutron ( $designate_enabled = false, $notification_topics = $facts['os_service_default'], ) { - include openstack_integration::config include openstack_integration::params @@ -514,13 +513,13 @@ Environment=OS_NEUTRON_CONFIG_FILES=${join($neutron_conf_files, ';')}", class { 'neutron::agents::l2gw': } } if $bgpvpn_enabled { - class {'neutron::services::bgpvpn': + class { 'neutron::services::bgpvpn': service_providers => 'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default', } } if $bgp_dragent_enabled { - class {'neutron::services::dr': } - class {'neutron::agents::bgp_dragent': + class { 'neutron::services::dr': } + class { 'neutron::agents::bgp_dragent': bgp_router_id => '127.0.0.1', } } diff --git a/manifests/nova.pp b/manifests/nova.pp index d6a9b3fba..f9d995759 100644 --- a/manifests/nova.pp +++ b/manifests/nova.pp @@ -39,7 +39,6 @@ class openstack_integration::nova ( $cinder_enabled = false, $libvirt_guests_enabled = false, ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/octavia.pp b/manifests/octavia.pp index 2ef175b1a..bae5b2a16 100644 --- a/manifests/octavia.pp +++ b/manifests/octavia.pp @@ -17,7 +17,6 @@ class openstack_integration::octavia ( $provider_driver = 'amphora', $jobboard_backend = 'redis', ) { - include openstack_integration::config include openstack_integration::params @@ -139,7 +138,7 @@ class openstack_integration::octavia ( ovn_sb_ca_cert => '/etc/octavia/switchcacert.pem', } require openstack_integration::ovn - } else{ + } else { $enabled_provider_drivers = undef $enabled_provider_agents = undef } diff --git a/manifests/ovn.pp b/manifests/ovn.pp index 21e31095d..ec49b8b80 100644 --- a/manifests/ovn.pp +++ b/manifests/ovn.pp @@ -1,8 +1,6 @@ # Configure the ovn service # -class openstack_integration::ovn( -){ - +class openstack_integration::ovn { include openstack_integration::config include openstack_integration::params @@ -23,6 +21,7 @@ class openstack_integration::ovn( $ovn_controller_ssl_cert = '/etc/openvswitch/ovncontroller-cert.pem' $ovn_controller_ssl_ca_cert = '/var/lib/openvswitch/pki/switchca/cacert.pem' + # lint:ignore:manifest_whitespace_opening_bracket_before ['ovnnb', 'ovnsb'].each |$ovndb| { file { "/etc/openvswitch/${ovndb}-privkey.pem": ensure => file, @@ -32,6 +31,7 @@ class openstack_integration::ovn( require => Vswitch::Pki::Cert[$ovndb], } ~> Service['northd'] } + # lint:endignore file { '/etc/openvswitch/ovncontroller-privkey.pem': ensure => file, @@ -40,7 +40,6 @@ class openstack_integration::ovn( group => 'openvswitch', require => Vswitch::Pki::Cert['ovncontroller'], } ~> Service['controller'] - } else { $ovn_nb_db_ssl_key = undef $ovn_nb_db_ssl_cert = undef diff --git a/manifests/ovn/ssl_key.pp b/manifests/ovn/ssl_key.pp index 5dd5b7e5d..958e3960d 100644 --- a/manifests/ovn/ssl_key.pp +++ b/manifests/ovn/ssl_key.pp @@ -3,9 +3,9 @@ # (optional) Owner of SSL private key # Defaults to $name. # -define openstack_integration::ovn::ssl_key( +define openstack_integration::ovn::ssl_key ( $key_owner = $name, -){ +) { ['ovnnb', 'ovnsb'].each |$ovndb| { ["${ovndb}-privkey.pem", "${ovndb}-cert.pem"].each |$ovn_ssl_file| { file { "/etc/${key_owner}/${ovn_ssl_file}": diff --git a/manifests/ovs.pp b/manifests/ovs.pp index 8506132f9..4eb2c3646 100644 --- a/manifests/ovs.pp +++ b/manifests/ovs.pp @@ -4,7 +4,7 @@ # (Optional) Set up br-ex bridge. # Defaults to true. # -class openstack_integration::ovs( +class openstack_integration::ovs ( $manage_bridge = true ) { include vswitch::ovs diff --git a/manifests/params.pp b/manifests/params.pp index 4f8c1d7cf..a0685743e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,5 +1,4 @@ class openstack_integration::params { - case $facts['os']['family'] { 'RedHat': { $ca_bundle_cert_path = '/etc/ssl/certs/ca-bundle.crt' @@ -21,5 +20,4 @@ class openstack_integration::params { fail("Unsupported osfamily: ${facts['os']['family']} operatingsystem") } } - } diff --git a/manifests/placement.pp b/manifests/placement.pp index 3e4f6f2a5..b4c8f9756 100644 --- a/manifests/placement.pp +++ b/manifests/placement.pp @@ -1,7 +1,6 @@ # Configure the Placement service class openstack_integration::placement { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/provision.pp b/manifests/provision.pp index 7ffb565d3..962bab3c3 100644 --- a/manifests/provision.pp +++ b/manifests/provision.pp @@ -22,8 +22,7 @@ class openstack_integration::provision ( $nova = true, $neutron = true, $image_format = 'qcow2', -){ - +) { include openstack_integration::config if $nova { diff --git a/manifests/rabbitmq.pp b/manifests/rabbitmq.pp index 1e69379ab..8b59e6f69 100644 --- a/manifests/rabbitmq.pp +++ b/manifests/rabbitmq.pp @@ -1,5 +1,4 @@ class openstack_integration::rabbitmq { - include openstack_integration::params include openstack_integration::config @@ -46,5 +45,4 @@ class openstack_integration::rabbitmq { provider => 'rabbitmqctl', require => Class['rabbitmq'], } - } diff --git a/manifests/repos.pp b/manifests/repos.pp index 879794780..07975e66a 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -1,5 +1,4 @@ class openstack_integration::repos { - case $facts['os']['family'] { 'Debian': { case $facts['os']['name'] { diff --git a/manifests/ssl_key.pp b/manifests/ssl_key.pp index 18dd990f7..e5a2474f2 100644 --- a/manifests/ssl_key.pp +++ b/manifests/ssl_key.pp @@ -8,11 +8,10 @@ # (optional) Owner of SSL private key # Defaults to $name. # -define openstack_integration::ssl_key( +define openstack_integration::ssl_key ( $key_path = undef, $key_owner = $name, ) { - include openstack_integration::config if $key_path == undef { diff --git a/manifests/swift.pp b/manifests/swift.pp index 8ef8d7452..c62716e37 100644 --- a/manifests/swift.pp +++ b/manifests/swift.pp @@ -4,10 +4,9 @@ # (Optional) Enable the ceilometer middleware # Defaults to false # -class openstack_integration::swift( - $ceilometer_enabled = false -){ - +class openstack_integration::swift ( + $ceilometer_enabled = false, +) { include openstack_integration::config if $openstack_integration::config::ssl { @@ -48,7 +47,6 @@ class openstack_integration::swift( owner => $log_dir_owner, group => 'adm', } - } else { file { '/var/log/swift': ensure => directory, @@ -157,7 +155,7 @@ class openstack_integration::swift( # internal client class { 'swift::internal_client': - pipeline => [ 'catch_errors', 'proxy-logging', 'cache', 'symlink', 'proxy-server' ], + pipeline => ['catch_errors', 'proxy-logging', 'cache', 'symlink', 'proxy-server'], node_timeout => 30, } include swift::internal_client::catch_errors @@ -175,7 +173,7 @@ class openstack_integration::swift( require => Anchor['swift::install::end'], } # Create 3 directories under /srv/node for 3 devices - [1, 2, 3].each | $device | { + [1, 2, 3].each |$device| { file { "/srv/node/${device}": ensure => directory, owner => 'swift', diff --git a/manifests/tempest.pp b/manifests/tempest.pp index 7e29be544..21803884a 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -195,7 +195,6 @@ class openstack_integration::tempest ( $image_format = 'qcow2', $share_protocol = 'NFS', ) { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/trove.pp b/manifests/trove.pp index 36dc76beb..16c041760 100644 --- a/manifests/trove.pp +++ b/manifests/trove.pp @@ -1,5 +1,4 @@ class openstack_integration::trove { - include openstack_integration::config include openstack_integration::params diff --git a/manifests/vitrage.pp b/manifests/vitrage.pp index 93ef6a4cd..94fd641da 100644 --- a/manifests/vitrage.pp +++ b/manifests/vitrage.pp @@ -1,5 +1,4 @@ class openstack_integration::vitrage { - include openstack_integration::config include openstack_integration::params @@ -103,5 +102,4 @@ class openstack_integration::vitrage { } Class['openstack_integration::redis'] -> Anchor['vitrage::service::begin'] class { 'vitrage::client': } - } diff --git a/manifests/watcher.pp b/manifests/watcher.pp index 769b652de..f1959b554 100644 --- a/manifests/watcher.pp +++ b/manifests/watcher.pp @@ -1,5 +1,4 @@ class openstack_integration::watcher { - include openstack_integration::config include openstack_integration::params @@ -48,7 +47,7 @@ class openstack_integration::watcher { roles => ['admin', 'service'], password => 'a_big_secret', } - class {'watcher::keystone::authtoken': + class { 'watcher::keystone::authtoken': password => 'a_big_secret', auth_version => 'v3', user_domain_name => 'Default', @@ -103,5 +102,4 @@ class openstack_integration::watcher { decision_engine_workers => 2, } class { 'watcher::cron::db_purge': } - } diff --git a/manifests/zaqar.pp b/manifests/zaqar.pp index c3431d122..26a633552 100644 --- a/manifests/zaqar.pp +++ b/manifests/zaqar.pp @@ -1,5 +1,4 @@ class openstack_integration::zaqar { - include openstack_integration::config if $openstack_integration::config::ssl { @@ -9,7 +8,7 @@ class openstack_integration::zaqar { } Exec['update-ca-certificates'] ~> Service['httpd'] } - class {'zaqar::logging': + class { 'zaqar::logging': debug => true, } class { 'zaqar::db::mysql': @@ -89,9 +88,8 @@ class openstack_integration::zaqar { bind => $openstack_integration::config::host, notification_bind => $openstack_integration::config::host, } - zaqar::server_instance{ '1': + zaqar::server_instance { '1': transport => 'websocket', } } - }