diff --git a/examples/magnum.pp b/examples/magnum.pp index 608001a..62bacbb 100644 --- a/examples/magnum.pp +++ b/examples/magnum.pp @@ -44,7 +44,7 @@ class { 'magnum': default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672', - rabbit_use_ssl => false, + rabbit_use_ssl => false, notification_driver => 'messagingv2', } @@ -57,4 +57,3 @@ class { 'magnum::certificates': cert_manager_type => 'local', } - diff --git a/manifests/api.pp b/manifests/api.pp index a1be8cb..713cdf2 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -69,7 +69,7 @@ # middleware should parse the proxy headers or not.(boolean value) # Defaults to $facts['os_service_default'] # -class magnum::api( +class magnum::api ( $package_ensure = 'present', Boolean $enabled = true, Boolean $manage_service = true, @@ -85,7 +85,6 @@ class magnum::api( $workers = $facts['os_workers'], $enable_proxy_headers_parsing = $facts['os_service_default'], ) inherits magnum::params { - include magnum::deps include magnum::params include magnum::policy @@ -144,7 +143,6 @@ class magnum::api( # On any uwsgi config change, we must restart Magnum API. Magnum_api_uwsgi_config<||> ~> Service['magnum-api'] - } elsif $service_name == 'httpd' { service { 'magnum-api': ensure => 'stopped', @@ -165,8 +163,7 @@ class magnum::api( include magnum::keystone::authtoken } - oslo::middleware {'magnum_config': + oslo::middleware { 'magnum_config': enable_proxy_headers_parsing => $enable_proxy_headers_parsing, } - } diff --git a/manifests/capi_helm.pp b/manifests/capi_helm.pp index ab80f93..d01cc1f 100644 --- a/manifests/capi_helm.pp +++ b/manifests/capi_helm.pp @@ -123,7 +123,6 @@ class magnum::capi_helm ( String[1] $csi_cinder_availability_zone = $facts['os_service_default'], String[1] $app_cred_interface_type = $facts['os_service_default'], ) inherits magnum::params { - include magnum::deps magnum_config { @@ -145,7 +144,7 @@ class magnum::capi_helm ( } if $kubeconfig_file and $kubeconfig { - file{ $kubeconfig_file: + file { $kubeconfig_file: owner => $kubeconfig_owner, group => $kubeconfig_group, mode => $kubeconfig_mode, @@ -155,4 +154,3 @@ class magnum::capi_helm ( } } } - diff --git a/manifests/certificates.pp b/manifests/certificates.pp index 5c58e50..0e6793a 100644 --- a/manifests/certificates.pp +++ b/manifests/certificates.pp @@ -16,13 +16,10 @@ class magnum::certificates ( $cert_manager_type = $facts['os_service_default'], $storage_path = $facts['os_service_default'], ) { - include magnum::deps magnum_config { 'certificates/cert_manager_type': value => $cert_manager_type; 'certificates/storage_path': value => $storage_path; } - } - diff --git a/manifests/cinder.pp b/manifests/cinder.pp index 62d9ae0..cd083d2 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -26,7 +26,6 @@ class magnum::cinder ( $default_boot_volume_type = $facts['os_service_default'], $default_boot_volume_size = $facts['os_service_default'], ) { - include magnum::deps magnum_config { @@ -35,6 +34,4 @@ class magnum::cinder ( 'cinder/default_boot_volume_type': value => $default_boot_volume_type; 'cinder/default_boot_volume_size': value => $default_boot_volume_size; } - } - diff --git a/manifests/client.pp b/manifests/client.pp index ecc4444..42eae54 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,7 +11,6 @@ class magnum::client ( $package_ensure = 'present' ) { - include magnum::deps include magnum::params @@ -20,5 +19,4 @@ class magnum::client ( name => $magnum::params::client_package, tag => 'openstack', } - } diff --git a/manifests/clients/barbican.pp b/manifests/clients/barbican.pp index e2bc1f2..7f23252 100644 --- a/manifests/clients/barbican.pp +++ b/manifests/clients/barbican.pp @@ -14,11 +14,10 @@ # communication with the OpenStack service. # Defaults to publicURL -class magnum::clients::barbican( +class magnum::clients::barbican ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/cinder.pp b/manifests/clients/cinder.pp index e37c579..5bff923 100644 --- a/manifests/clients/cinder.pp +++ b/manifests/clients/cinder.pp @@ -34,7 +34,7 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # -class magnum::clients::cinder( +class magnum::clients::cinder ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $api_version = $facts['os_service_default'], @@ -43,7 +43,6 @@ class magnum::clients::cinder( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/glance.pp b/manifests/clients/glance.pp index f1cb079..d35077e 100644 --- a/manifests/clients/glance.pp +++ b/manifests/clients/glance.pp @@ -34,8 +34,7 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # - -class magnum::clients::glance( +class magnum::clients::glance ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $api_version = $facts['os_service_default'], @@ -44,7 +43,6 @@ class magnum::clients::glance( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/heat.pp b/manifests/clients/heat.pp index 9f5995c..1b6412d 100644 --- a/manifests/clients/heat.pp +++ b/manifests/clients/heat.pp @@ -34,8 +34,7 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # - -class magnum::clients::heat( +class magnum::clients::heat ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $api_version = $facts['os_service_default'], @@ -44,7 +43,6 @@ class magnum::clients::heat( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/magnum.pp b/manifests/clients/magnum.pp index 94d5a2b..b78219f 100644 --- a/manifests/clients/magnum.pp +++ b/manifests/clients/magnum.pp @@ -13,12 +13,11 @@ # (optional) Type of endpoint in Identity service catalog to use for # communication with the OpenStack service. # Defaults to publicURL - -class magnum::clients::magnum( +# +class magnum::clients::magnum ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/neutron.pp b/manifests/clients/neutron.pp index cf31916..baad175 100644 --- a/manifests/clients/neutron.pp +++ b/manifests/clients/neutron.pp @@ -30,7 +30,7 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # -class magnum::clients::neutron( +class magnum::clients::neutron ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $ca_file = $magnum::clients::ca_file, @@ -38,7 +38,6 @@ class magnum::clients::neutron( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/nova.pp b/manifests/clients/nova.pp index 2c685e0..6a9df24 100644 --- a/manifests/clients/nova.pp +++ b/manifests/clients/nova.pp @@ -34,8 +34,8 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # - -class magnum::clients::nova( +# +class magnum::clients::nova ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $api_version = $facts['os_service_default'], @@ -44,7 +44,6 @@ class magnum::clients::nova( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/clients/octavia.pp b/manifests/clients/octavia.pp index cb3c803..47ed9a4 100644 --- a/manifests/clients/octavia.pp +++ b/manifests/clients/octavia.pp @@ -30,7 +30,7 @@ # (optional) If set, then the server's certificate will not be verified. # Defaults to false # -class magnum::clients::octavia( +class magnum::clients::octavia ( $region_name = $magnum::clients::region_name, $endpoint_type = $magnum::clients::endpoint_type, $ca_file = $magnum::clients::ca_file, @@ -38,7 +38,6 @@ class magnum::clients::octavia( $key_file = $magnum::clients::key_file, $insecure = $magnum::clients::insecure, ) inherits magnum::clients { - include magnum::deps include magnum::params diff --git a/manifests/cluster.pp b/manifests/cluster.pp index c63a346..32c9197 100644 --- a/manifests/cluster.pp +++ b/manifests/cluster.pp @@ -28,7 +28,6 @@ class magnum::cluster ( $temp_cache_dir = $facts['os_service_default'], $pre_delete_lb_timeout = $facts['os_service_default'], ) { - include magnum::deps magnum_config { diff --git a/manifests/cluster_template.pp b/manifests/cluster_template.pp index 107b8de..039ea7b 100644 --- a/manifests/cluster_template.pp +++ b/manifests/cluster_template.pp @@ -16,7 +16,6 @@ class magnum::cluster_template ( $kubernetes_allowed_network_drivers = $facts['os_service_default'], $kubernetes_default_network_driver = $facts['os_service_default'], ) { - include magnum::deps magnum_config { diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 639faa8..f7c9d74 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -24,14 +24,13 @@ # (optional) Number of conductor workers. # Defaults to $facts['os_workers'] # -class magnum::conductor( +class magnum::conductor ( Boolean $enabled = true, Boolean $manage_service = true, $package_ensure = 'present', $auth_strategy = 'keystone', $workers = $facts['os_workers'], ) { - include magnum::db include magnum::deps include magnum::params diff --git a/manifests/config.pp b/manifests/config.pp index 44c18a2..f181af5 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -27,7 +27,6 @@ class magnum::config ( Hash $magnum_config = {}, Hash $magnum_api_paste_ini = {}, ) { - include magnum::deps create_resources('magnum_config', $magnum_config) diff --git a/manifests/db.pp b/manifests/db.pp index 025b005..e0ebd76 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -54,7 +54,6 @@ class magnum::db ( $mysql_enable_ndb = $facts['os_service_default'], $database_db_max_retries = $facts['os_service_default'], ) { - include magnum::deps oslo::db { 'magnum_config': diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index ba5cab5..140bbd9 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -33,7 +33,7 @@ # Only used with mysql modules >= 2.2. # Defaults to 'utf8_general_ci' # -class magnum::db::mysql( +class magnum::db::mysql ( String[1] $password, $dbname = 'magnum', $user = 'magnum', @@ -42,7 +42,6 @@ class magnum::db::mysql( $collate = 'utf8_general_ci', $allowed_hosts = undef ) { - include magnum::deps openstacklib::db::mysql { 'magnum': @@ -58,5 +57,4 @@ class magnum::db::mysql( Anchor['magnum::db::begin'] ~> Class['magnum::db::mysql'] ~> Anchor['magnum::db::end'] - } diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 0017b7c..5cad3b1 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -24,14 +24,13 @@ # (Optional) Privileges given to the database user. # Default to 'ALL' # -class magnum::db::postgresql( +class magnum::db::postgresql ( $password, $dbname = 'magnum', $user = 'magnum', $encoding = undef, $privileges = 'ALL', ) { - include magnum::deps openstacklib::db::postgresql { 'magnum': @@ -45,5 +44,4 @@ class magnum::db::postgresql( Anchor['magnum::db::begin'] ~> Class['magnum::db::postgresql'] ~> Anchor['magnum::db::end'] - } diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index ef4f08c..8bed604 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -16,12 +16,11 @@ # (Optional) Timeout for the execution of the db_sync # Defaults to 300 # -class magnum::db::sync( +class magnum::db::sync ( $user = 'magnum', $extra_params = '', $db_sync_timeout = 300, ) { - include magnum::deps include magnum::params @@ -42,5 +41,4 @@ class magnum::db::sync( notify => Anchor['magnum::dbsync::end'], tag => 'openstack-db', } - } diff --git a/manifests/docker_registry.pp b/manifests/docker_registry.pp index 3c0ddcd..ef55fe4 100644 --- a/manifests/docker_registry.pp +++ b/manifests/docker_registry.pp @@ -17,6 +17,7 @@ class magnum::docker_registry ( $swift_region = $facts['os_service_default'], $swift_registry_container = $facts['os_service_default'], ) { + include magnum::deps magnum_config { 'docker_registry/swift_region': value => $swift_region; diff --git a/manifests/drivers.pp b/manifests/drivers.pp index 12e27d9..d7dc45a 100644 --- a/manifests/drivers.pp +++ b/manifests/drivers.pp @@ -28,7 +28,6 @@ class magnum::drivers ( Variant[Array, Openstacklib::ServiceDefault] $disabled_drivers = $facts['os_service_default'], Variant[Array, Openstacklib::ServiceDefault] $enabled_beta_drivers = $facts['os_service_default'], ) { - include magnum::deps magnum_config { diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index ec0549a..7fc86f3 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -46,7 +46,6 @@ class magnum::healthcheck ( $disable_by_file_paths = $facts['os_service_default'], $enable_by_file_paths = $facts['os_service_default'], ) { - include magnum::deps oslo::healthcheck { 'magnum_config': diff --git a/manifests/init.pp b/manifests/init.pp index 07b763c..e2259c6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -174,7 +174,7 @@ # will be run through a green thread. # Defaults to undef # -class magnum( +class magnum ( $package_ensure = 'present', $notification_transport_url = $facts['os_service_default'], $notification_driver = $facts['os_service_default'], @@ -210,7 +210,6 @@ class magnum( # DEPRECATED PARAMETERS $rabbit_heartbeat_in_pthread = undef, ) { - include magnum::deps include magnum::params include magnum::policy @@ -265,5 +264,4 @@ class magnum( topics => $notification_topics, retry => $notification_retry, } - } diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 9fa451b..0a739c5 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -97,7 +97,6 @@ class magnum::keystone::auth ( Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:9511/v1', Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:9511/v1', ) { - include magnum::deps $real_service_name = pick($service_name, $auth_name) @@ -124,5 +123,4 @@ class magnum::keystone::auth ( internal_url => $internal_url, admin_url => $admin_url, } - } diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index bb97893..2bd4308 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -189,7 +189,7 @@ # "public", "internal" or "admin". # Defaults to $facts['os_service_default']. # -class magnum::keystone::authtoken( +class magnum::keystone::authtoken ( String[1] $password, $username = 'magnum', $auth_url = 'http://localhost:5000', @@ -228,7 +228,6 @@ class magnum::keystone::authtoken( $service_type = $facts['os_service_default'], $interface = $facts['os_service_default'], ) { - include magnum::deps keystone::resource::authtoken { 'magnum_config': diff --git a/manifests/keystone/domain.pp b/manifests/keystone/domain.pp index d3faa22..0a25441 100644 --- a/manifests/keystone/domain.pp +++ b/manifests/keystone/domain.pp @@ -88,7 +88,6 @@ class magnum::keystone::domain ( $domain_admin_id = undef, $domain_admin_domain_id = undef, ) { - include magnum::deps include magnum::params @@ -142,5 +141,4 @@ class magnum::keystone::domain ( 'trust/trustee_keystone_interface': value => $keystone_interface; 'trust/trustee_keystone_region_name': value => $keystone_region_name; } - } diff --git a/manifests/keystone/keystone_auth.pp b/manifests/keystone/keystone_auth.pp index b022f10..a72f883 100644 --- a/manifests/keystone/keystone_auth.pp +++ b/manifests/keystone/keystone_auth.pp @@ -53,7 +53,7 @@ # against any certificate authorities. # Defaults to $facts['os_service_default'] # -class magnum::keystone::keystone_auth( +class magnum::keystone::keystone_auth ( $password, $username = 'magnum', $auth_url = 'http://localhost:5000', @@ -67,7 +67,6 @@ class magnum::keystone::keystone_auth( $certfile = $facts['os_service_default'], $insecure = $facts['os_service_default'], ) { - include magnum::deps if is_service_default($system_scope) { diff --git a/manifests/logging.pp b/manifests/logging.pp index eb6822e..73bda8e 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -101,7 +101,7 @@ # Defaults to $facts['os_service_default'] # Example: 'Y-%m-%d %H:%M:%S' # -class magnum::logging( +class magnum::logging ( $use_syslog = $facts['os_service_default'], $use_json = $facts['os_service_default'], $use_journal = $facts['os_service_default'], @@ -122,7 +122,6 @@ class magnum::logging( $instance_uuid_format = $facts['os_service_default'], $log_date_format = $facts['os_service_default'], ) { - include magnum::deps oslo::log { 'magnum_config': @@ -146,5 +145,4 @@ class magnum::logging( instance_format => $instance_format, instance_uuid_format => $instance_uuid_format, } - } diff --git a/manifests/params.pp b/manifests/params.pp index 2e3f024..866d503 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -36,6 +36,5 @@ class magnum::params { default: { fail("Unsupported osfamily: ${facts['os']['family']}") } - } # Case $facts['os']['family'] } diff --git a/manifests/policy.pp b/manifests/policy.pp index 99eea1f..9140495 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -54,7 +54,6 @@ class magnum::policy ( $policy_dirs = $facts['os_service_default'], Boolean $purge_config = false, ) { - include magnum::deps include magnum::params @@ -82,5 +81,4 @@ class magnum::policy ( policy_default_rule => $policy_default_rule, policy_dirs => $policy_dirs, } - } diff --git a/manifests/quota.pp b/manifests/quota.pp index 138f0cd..ddc21cd 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -11,6 +11,7 @@ class magnum::quota ( $max_clusters_per_project = $facts['os_service_default'] ) { + include magnum::deps magnum_config { 'quotas/max_clusters_per_project': value => $max_clusters_per_project; diff --git a/manifests/reports.pp b/manifests/reports.pp index ae04574..5872e05 100644 --- a/manifests/reports.pp +++ b/manifests/reports.pp @@ -17,12 +17,11 @@ # is set. # Defaults to $facts['os_service_default'] # -class magnum::reports( +class magnum::reports ( $log_dir = $facts['os_service_default'], $file_event_handler = $facts['os_service_default'], $file_event_handler_interval = $facts['os_service_default'], ) { - include magnum::deps oslo::reports { 'magnum_config': diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 87f861b..e60cc53 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -146,7 +146,6 @@ class magnum::wsgi::apache ( $headers = undef, $request_headers = undef, ) { - include magnum::deps include magnum::params diff --git a/manifests/wsgi/uwsgi.pp b/manifests/wsgi/uwsgi.pp index f75c69c..152108c 100644 --- a/manifests/wsgi/uwsgi.pp +++ b/manifests/wsgi/uwsgi.pp @@ -25,11 +25,10 @@ class magnum::wsgi::uwsgi ( $processes = $facts['os_workers'], $threads = 32, $listen_queue_size = 100, -){ - +) { include magnum::deps - if $facts['os']['name'] != 'Debian'{ + if $facts['os']['name'] != 'Debian' { warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } diff --git a/manifests/x509.pp b/manifests/x509.pp index d714349..77dcddb 100644 --- a/manifests/x509.pp +++ b/manifests/x509.pp @@ -31,7 +31,6 @@ class magnum::x509 ( $term_of_validity = $facts['os_service_default'], $rsa_key_size = $facts['os_service_default'], ) { - include magnum::deps magnum_config { @@ -41,6 +40,4 @@ class magnum::x509 ( 'x509/term_of_validity': value => $term_of_validity; 'x509/rsa_key_size': value => $rsa_key_size; } - } -