From 0868b32e799f13229000e3ece8748bfd18eb1b15 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 8 Dec 2019 23:21:35 +0100 Subject: [PATCH] Convert all class usage to relative names Change-Id: I0335cf49c2ce55659c49325f2c0028f1af93705d --- README.md | 12 ++--- examples/all.pp | 12 ++--- examples/site.pp | 38 ++++++++-------- manifests/auth_file.pp | 2 +- manifests/bench.pp | 2 +- manifests/client.pp | 4 +- manifests/config.pp | 2 +- manifests/containerreconciler.pp | 2 +- manifests/dispersion.pp | 4 +- manifests/init.pp | 6 +-- manifests/keymaster.pp | 2 +- manifests/keystone/auth.pp | 2 +- manifests/keystone/dispersion.pp | 2 +- manifests/objectexpirer.pp | 2 +- manifests/params.pp | 2 +- manifests/proxy.pp | 2 +- manifests/proxy/account_quotas.pp | 2 +- manifests/proxy/authtoken.pp | 2 +- manifests/proxy/bulk.pp | 2 +- manifests/proxy/cache.pp | 2 +- manifests/proxy/catch_errors.pp | 2 +- manifests/proxy/ceilometer.pp | 2 +- manifests/proxy/container_quotas.pp | 2 +- manifests/proxy/container_sync.pp | 2 +- manifests/proxy/copy.pp | 4 +- manifests/proxy/crossdomain.pp | 2 +- manifests/proxy/dlo.pp | 4 +- manifests/proxy/encryption.pp | 4 +- manifests/proxy/formpost.pp | 2 +- manifests/proxy/gatekeeper.pp | 2 +- manifests/proxy/healthcheck.pp | 2 +- manifests/proxy/keystone.pp | 2 +- manifests/proxy/kms_keymaster.pp | 4 +- manifests/proxy/proxy_logging.pp | 2 +- manifests/proxy/ratelimit.pp | 2 +- manifests/proxy/s3api.pp | 2 +- manifests/proxy/s3token.pp | 2 +- manifests/proxy/slo.pp | 2 +- manifests/proxy/staticweb.pp | 2 +- manifests/proxy/swauth.pp | 2 +- manifests/proxy/swift3.pp | 4 +- manifests/proxy/tempauth.pp | 2 +- manifests/proxy/tempauth_account.pp | 2 +- manifests/proxy/tempurl.pp | 2 +- manifests/proxy/versioned_writes.pp | 4 +- manifests/ringbuilder.pp | 2 +- manifests/ringbuilder/create.pp | 2 +- manifests/ringbuilder/policy_ring.pp | 2 +- manifests/ringbuilder/rebalance.pp | 2 +- manifests/ringserver.pp | 4 +- manifests/ringsync.pp | 2 +- manifests/service.pp | 4 +- manifests/storage.pp | 2 +- manifests/storage/account.pp | 2 +- manifests/storage/all.pp | 4 +- manifests/storage/container.pp | 2 +- manifests/storage/disk.pp | 2 +- manifests/storage/ext4.pp | 2 +- manifests/storage/filter/healthcheck.pp | 2 +- manifests/storage/filter/recon.pp | 2 +- manifests/storage/generic.pp | 4 +- manifests/storage/loopback.pp | 2 +- manifests/storage/mount.pp | 2 +- manifests/storage/node.pp | 2 +- manifests/storage/object.pp | 2 +- manifests/storage/policy.pp | 2 +- manifests/storage/server.pp | 2 +- manifests/storage/xfs.pp | 4 +- manifests/test_file.pp | 2 +- manifests/xfs.pp | 2 +- spec/acceptance/basic_swift_spec.rb | 58 ++++++++++++------------- spec/classes/swift_proxy_spec.rb | 22 +++++----- 72 files changed, 153 insertions(+), 153 deletions(-) diff --git a/README.md b/README.md index ad811e1f..f9b32ece 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ The existing storage node and ringbuilder manifest will be: } # Build the existing ring - class { '::swift::ringbuilder': + class { 'swift::ringbuilder': part_power => '14', replicas => '1', min_part_hours => 1, @@ -270,7 +270,7 @@ The port for which the proxy service will bind to when it starts. Configures [DLO middleware](https://docs.openstack.org/swift/latest/middleware.html#module-swift.common.middleware.dlo) for swift proxy. ```puppet -class { '::swift::proxy::dlo': +class { 'swift::proxy::dlo': rate_limit_after_segment => '10', rate_limit_segments_per_sec => '1', max_get_time => '86400' @@ -432,19 +432,19 @@ a templated init or services file. This is managed by this provider. For EL and * To use the swiftinit service provider set "service_provider" on the supported components you have defined in your config manifest. ```puppet - class { '::swift::storage::account': + class { 'swift::storage::account': service_provider => 'swiftinit', } - class { '::swift::storage::container': + class { 'swift::storage::container': service_provider => 'swiftinit', } - class { '::swift::storage::object': + class { 'swift::storage::object': service_provider => 'swiftinit', } class {'::swift::objectexpirer': service_provider => 'swiftinit', } - class { '::swift::proxy': + class { 'swift::proxy': service_provider => 'swiftinit', } ``` diff --git a/examples/all.pp b/examples/all.pp index 49411604..eb748e86 100644 --- a/examples/all.pp +++ b/examples/all.pp @@ -11,11 +11,11 @@ Exec { logoutput => true } package { 'curl': ensure => present } -class { '::memcached': +class { 'memcached': listen_ip => $swift_local_net_ip, } -class { '::swift': +class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => $swift_shared_secret, package_ensure => latest, @@ -23,7 +23,7 @@ class { '::swift': # === Configure Storage -class { '::swift::storage': +class { 'swift::storage': storage_local_net_ip => $swift_local_net_ip, } @@ -44,7 +44,7 @@ swift::storage::node { '2': require => Swift::Storage::Loopback[2] , } -class { '::swift::ringbuilder': +class { 'swift::ringbuilder': part_power => '18', replicas => '1', min_part_hours => 1, @@ -53,7 +53,7 @@ class { '::swift::ringbuilder': # TODO should I enable swath in the default config? -class { '::swift::proxy': +class { 'swift::proxy': proxy_local_net_ip => $swift_local_net_ip, pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'], account_autocreate => true, @@ -61,7 +61,7 @@ class { '::swift::proxy': } class { ['::swift::proxy::healthcheck', '::swift::proxy::cache']: } -class { '::swift::proxy::tempauth': +class { 'swift::proxy::tempauth': account_user_list => [ { 'user' => 'admin', diff --git a/examples/site.pp b/examples/site.pp index b3258d76..5a13ddab 100644 --- a/examples/site.pp +++ b/examples/site.pp @@ -69,7 +69,7 @@ $swift_keystone_admin_password = hiera('admin_password', 'ChangeMe') node 'swift-keystone' { # set up mysql server - class { '::mysql::server': + class { 'mysql::server': config_hash => { # the priv grant fails on precise if I set a root password # TODO I should make sure that this works @@ -83,11 +83,11 @@ node 'swift-keystone' { } # set up all openstack databases, users, grants - class { '::keystone::db::mysql': + class { 'keystone::db::mysql': password => $swift_keystone_db_password, } - class { '::keystone': + class { 'keystone': debug => $debug, catalog_type => 'sql', admin_password => $swift_keystone_admin_password, @@ -96,15 +96,15 @@ node 'swift-keystone' { } # Setup the Keystone Identity Endpoint - class { '::keystone::endpoint': } + class { 'keystone::endpoint': } # set up keystone admin users - class { '::keystone::roles::admin': + class { 'keystone::roles::admin': email => $swift_keystone_admin_email, password => $swift_keystone_admin_password, } # configure the keystone service user and endpoint - class { '::swift::keystone::auth': + class { 'swift::keystone::auth': password => $swift_admin_password, public_address => $swift_proxy_node, } @@ -121,7 +121,7 @@ node 'swift-keystone' { # node /swift-storage/ { - class { '::swift': + class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => $swift_shared_secret, package_ensure => latest, @@ -139,7 +139,7 @@ node /swift-storage/ { swift::storage::filter::healthcheck { $rings: } # install all swift storage servers together - class { '::swift::storage::all': + class { 'swift::storage::all': storage_local_net_ip => $swift_local_net_ip, object_pipeline => $object_pipeline, container_pipeline => $container_pipeline, @@ -185,7 +185,7 @@ node /swift-storage/ { node /swift-proxy/ { - class { '::swift': + class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => $swift_shared_secret, package_ensure => latest, @@ -194,12 +194,12 @@ node /swift-proxy/ { # curl is only required so that I can run tests package { 'curl': ensure => present } - class { '::memcached': + class { 'memcached': listen_ip => '127.0.0.1', } # specify swift proxy and all of its middlewares - class { '::swift::proxy': + class { 'swift::proxy': proxy_local_net_ip => $swift_local_net_ip, pipeline => [ 'bulk', @@ -228,28 +228,28 @@ node /swift-proxy/ { '::swift::proxy::cache', '::swift::proxy::swift3', ]: } - class { '::swift::proxy::bulk': + class { 'swift::proxy::bulk': max_containers_per_extraction => 10000, max_failed_extractions => 1000, max_deletes_per_request => 10000, yield_frequency => 60, } - class { '::swift::proxy::ratelimit': + class { 'swift::proxy::ratelimit': clock_accuracy => 1000, max_sleep_time_seconds => 60, log_sleep_time_seconds => 0, rate_buffer_seconds => 5, account_ratelimit => 0, } - class { '::swift::proxy::s3token': + class { 'swift::proxy::s3token': # assume that the controller host is the swift api server auth_host => $swift_keystone_node, auth_port => '5000', } - class { '::swift::proxy::keystone': + class { 'swift::proxy::keystone': operator_roles => ['admin', 'SwiftOperator'], } - class { '::swift::proxy::authtoken': + class { 'swift::proxy::authtoken': password => $swift_admin_password, # assume that the controller host is the swift api server auth_host => $swift_keystone_node, @@ -262,7 +262,7 @@ node /swift-proxy/ { Ring_account_device <<| |>> # create the ring - class { '::swift::ringbuilder': + class { 'swift::ringbuilder': # the part power should be determined by assuming 100 partitions per drive part_power => '18', replicas => '3', @@ -271,7 +271,7 @@ node /swift-proxy/ { } # sets up an rsync db that can be used to sync the ring DB - class { '::swift::ringserver': + class { 'swift::ringserver': local_net_ip => $swift_local_net_ip, } @@ -281,7 +281,7 @@ node /swift-proxy/ { } # deploy a script that can be used for testing - class { '::swift::test_file': + class { 'swift::test_file': auth_server => $swift_keystone_node, password => $swift_keystone_admin_password, } diff --git a/manifests/auth_file.pp b/manifests/auth_file.pp index 8e2edd01..5591142a 100644 --- a/manifests/auth_file.pp +++ b/manifests/auth_file.pp @@ -25,7 +25,7 @@ class swift::auth_file ( $auth_url = 'http://127.0.0.1:5000/v3/' ) { - include ::swift::deps + include swift::deps file { '/root/swiftrc': ensure => file, diff --git a/manifests/bench.pp b/manifests/bench.pp index b9f20405..7ea1ef68 100644 --- a/manifests/bench.pp +++ b/manifests/bench.pp @@ -84,7 +84,7 @@ class swift::bench ( $delete = 'yes', ){ - include ::swift::deps + include swift::deps swift_bench_config { 'bench/auth': value => $auth_url; diff --git a/manifests/client.pp b/manifests/client.pp index 7014f122..29696862 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -12,8 +12,8 @@ class swift::client ( $ensure = 'present', ) { - include ::swift::deps - include ::swift::params + include swift::deps + include swift::params package { 'swiftclient': ensure => $ensure, diff --git a/manifests/config.pp b/manifests/config.pp index 786031fd..d31cc2d0 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -34,7 +34,7 @@ class swift::config ( $swift_proxy_config = {}, ) { - include ::swift::deps + include swift::deps validate_legacy(Hash, 'validate_hash', $swift_config) validate_legacy(Hash, 'validate_hash', $swift_container_sync_realms_config) diff --git a/manifests/containerreconciler.pp b/manifests/containerreconciler.pp index 2e23ec9f..4e6ce0ca 100644 --- a/manifests/containerreconciler.pp +++ b/manifests/containerreconciler.pp @@ -60,7 +60,7 @@ class swift::containerreconciler( $memcache_servers = ['127.0.0.1:11211'], ) inherits ::swift::params { - include ::swift::deps + include swift::deps Swift_config<| |> ~> Service['swift-container-reconciler'] Swift_container_reconciler_config<||> ~> Service['swift-container-reconciler'] diff --git a/manifests/dispersion.pp b/manifests/dispersion.pp index 6b097f12..80993320 100644 --- a/manifests/dispersion.pp +++ b/manifests/dispersion.pp @@ -80,8 +80,8 @@ class swift::dispersion ( $dump_json = 'no' ) { - include ::swift::deps - include ::swift::params + include swift::deps + include swift::params Swift_dispersion_config<||> ~> Exec['swift-dispersion-populate'] diff --git a/manifests/init.pp b/manifests/init.pp index 67367e6c..504c6281 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -59,9 +59,9 @@ class swift( $client_package_ensure = undef, ) { - include ::swift::deps - include ::swift::params - include ::swift::client + include swift::deps + include swift::params + include swift::client if $client_package_ensure { warning('swift::client_package_ensure is deprecated and has no effect') diff --git a/manifests/keymaster.pp b/manifests/keymaster.pp index 200eea78..27e511e8 100644 --- a/manifests/keymaster.pp +++ b/manifests/keymaster.pp @@ -78,7 +78,7 @@ class swift::keymaster( $user_domain_id = 'default', ) { - include ::swift::deps + include swift::deps swift_keymaster_config { 'kms_keymaster/api_class': value => $api_class; diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index f722fc44..ea25153a 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -110,7 +110,7 @@ class swift::keystone::auth( $internal_url_s3 = 'http://127.0.0.1:8080', ) { - include ::swift::deps + include swift::deps if $service_name == $service_name_s3 { fail('swift::keystone::auth parameters service_name and service_name_s3 must be different.') diff --git a/manifests/keystone/dispersion.pp b/manifests/keystone/dispersion.pp index f55fbc8d..a8fd7d23 100644 --- a/manifests/keystone/dispersion.pp +++ b/manifests/keystone/dispersion.pp @@ -36,7 +36,7 @@ class swift::keystone::dispersion( $tenant = 'services' ) { - include ::swift::deps + include swift::deps keystone_user { $auth_user: ensure => present, diff --git a/manifests/objectexpirer.pp b/manifests/objectexpirer.pp index 821c82a2..13d1e126 100644 --- a/manifests/objectexpirer.pp +++ b/manifests/objectexpirer.pp @@ -99,7 +99,7 @@ class swift::objectexpirer( $log_facility = 'LOG_LOCAL2', ) inherits ::swift::params { - include ::swift::deps + include swift::deps Swift_config<| |> ~> Service['swift-object-expirer'] Swift_object_expirer_config<||> ~> Service['swift-object-expirer'] diff --git a/manifests/params.pp b/manifests/params.pp index 0eb4fb43..a46a79c5 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,7 @@ # Parameters for puppet-swift # class swift::params { - include ::openstacklib::defaults + include openstacklib::defaults $pyvers = $::openstacklib::defaults::pyvers $client_package = "python${pyvers}-swiftclient" diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 79796b0d..73e0b979 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -182,7 +182,7 @@ class swift::proxy( $purge_config = false, ) inherits ::swift::params { - include ::swift::deps + include swift::deps Swift_config<| |> ~> Service['swift-proxy-server'] validate_legacy(Boolean, 'validate_bool', $account_autocreate) diff --git a/manifests/proxy/account_quotas.pp b/manifests/proxy/account_quotas.pp index a55ea650..32d9fd7e 100644 --- a/manifests/proxy/account_quotas.pp +++ b/manifests/proxy/account_quotas.pp @@ -19,7 +19,7 @@ # class swift::proxy::account_quotas() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:account_quotas/use': value => 'egg:swift#account_quotas'; diff --git a/manifests/proxy/authtoken.pp b/manifests/proxy/authtoken.pp index c0e82f20..0199c144 100644 --- a/manifests/proxy/authtoken.pp +++ b/manifests/proxy/authtoken.pp @@ -106,7 +106,7 @@ class swift::proxy::authtoken( $auth_uri = undef, ) inherits swift::params { - include ::swift::deps + include swift::deps if $identity_uri { warning('identity_uri is deprecated and will be removed, please use auth_url instead') diff --git a/manifests/proxy/bulk.pp b/manifests/proxy/bulk.pp index 73595c19..c01bb28e 100644 --- a/manifests/proxy/bulk.pp +++ b/manifests/proxy/bulk.pp @@ -44,7 +44,7 @@ class swift::proxy::bulk( $yield_frequency = '60', ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:bulk/use': value => 'egg:swift#bulk'; diff --git a/manifests/proxy/cache.pp b/manifests/proxy/cache.pp index 8dac5eca..f328c24f 100644 --- a/manifests/proxy/cache.pp +++ b/manifests/proxy/cache.pp @@ -26,7 +26,7 @@ class swift::proxy::cache( $memcache_max_connections = '2' ) { - include ::swift::deps + include swift::deps # require the memcached class if its on the same machine if !empty(grep(any2array($memcache_servers), '127.0.0.1')) { diff --git a/manifests/proxy/catch_errors.pp b/manifests/proxy/catch_errors.pp index 1ec88855..9001c0bd 100644 --- a/manifests/proxy/catch_errors.pp +++ b/manifests/proxy/catch_errors.pp @@ -17,7 +17,7 @@ # class swift::proxy::catch_errors() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:catch_errors/use': value => 'egg:swift#catch_errors'; diff --git a/manifests/proxy/ceilometer.pp b/manifests/proxy/ceilometer.pp index b9813437..133ab399 100644 --- a/manifests/proxy/ceilometer.pp +++ b/manifests/proxy/ceilometer.pp @@ -137,7 +137,7 @@ class swift::proxy::ceilometer( $kombu_ssl_version = $::os_service_default, ) inherits swift { - include ::swift::deps + include swift::deps User['swift'] { groups +> $group, diff --git a/manifests/proxy/container_quotas.pp b/manifests/proxy/container_quotas.pp index c52413f2..1905ff9c 100644 --- a/manifests/proxy/container_quotas.pp +++ b/manifests/proxy/container_quotas.pp @@ -19,7 +19,7 @@ # class swift::proxy::container_quotas() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:container_quotas/use': value => 'egg:swift#container_quotas'; diff --git a/manifests/proxy/container_sync.pp b/manifests/proxy/container_sync.pp index cfdb4268..df6a37b4 100644 --- a/manifests/proxy/container_sync.pp +++ b/manifests/proxy/container_sync.pp @@ -7,7 +7,7 @@ # class swift::proxy::container_sync() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:container_sync/use': value => 'egg:swift#container_sync'; diff --git a/manifests/proxy/copy.pp b/manifests/proxy/copy.pp index 267f5c8d..fde47708 100644 --- a/manifests/proxy/copy.pp +++ b/manifests/proxy/copy.pp @@ -3,7 +3,7 @@ # # == Examples # -# include ::swift::proxy::copy +# include swift::proxy::copy # # == Parameters # @@ -19,7 +19,7 @@ class swift::proxy::copy ( $object_post_as_copy = true ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:copy/use': value => 'egg:swift#copy'; diff --git a/manifests/proxy/crossdomain.pp b/manifests/proxy/crossdomain.pp index 081aa88f..cb572511 100644 --- a/manifests/proxy/crossdomain.pp +++ b/manifests/proxy/crossdomain.pp @@ -15,7 +15,7 @@ class swift::proxy::crossdomain ( $cross_domain_policy = '', ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:crossdomain/use': value => 'egg:swift#crossdomain'; diff --git a/manifests/proxy/dlo.pp b/manifests/proxy/dlo.pp index 9e636827..b6c7e965 100644 --- a/manifests/proxy/dlo.pp +++ b/manifests/proxy/dlo.pp @@ -3,7 +3,7 @@ # # == Examples # -# include ::swift::proxy::dlo +# include swift::proxy::dlo # # == Parameters # @@ -34,7 +34,7 @@ class swift::proxy::dlo ( $max_get_time = '86400' ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:dlo/use': value => 'egg:swift#dlo'; diff --git a/manifests/proxy/encryption.pp b/manifests/proxy/encryption.pp index 61aa614b..36ac456d 100644 --- a/manifests/proxy/encryption.pp +++ b/manifests/proxy/encryption.pp @@ -3,7 +3,7 @@ # # == Examples # -# include ::swift::proxy::encryption +# include swift::proxy::encryption # # == Parameters # @@ -17,7 +17,7 @@ class swift::proxy::encryption ( $disable_encryption = false ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:encryption/use': value => 'egg:swift#encryption'; diff --git a/manifests/proxy/formpost.pp b/manifests/proxy/formpost.pp index c1db189f..0943658a 100644 --- a/manifests/proxy/formpost.pp +++ b/manifests/proxy/formpost.pp @@ -17,7 +17,7 @@ # class swift::proxy::formpost() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:formpost/use': value => 'egg:swift#formpost'; diff --git a/manifests/proxy/gatekeeper.pp b/manifests/proxy/gatekeeper.pp index c818d0a5..38185de2 100644 --- a/manifests/proxy/gatekeeper.pp +++ b/manifests/proxy/gatekeeper.pp @@ -43,7 +43,7 @@ class swift::proxy::gatekeeper( $log_address = '/dev/log' ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:gatekeeper/use': value => 'egg:swift#gatekeeper'; diff --git a/manifests/proxy/healthcheck.pp b/manifests/proxy/healthcheck.pp index 6b8aad7c..d2f33eec 100644 --- a/manifests/proxy/healthcheck.pp +++ b/manifests/proxy/healthcheck.pp @@ -15,7 +15,7 @@ # class swift::proxy::healthcheck() { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:healthcheck/use': value => 'egg:swift#healthcheck'; diff --git a/manifests/proxy/keystone.pp b/manifests/proxy/keystone.pp index f27f5ea1..9bd28b5e 100644 --- a/manifests/proxy/keystone.pp +++ b/manifests/proxy/keystone.pp @@ -37,7 +37,7 @@ class swift::proxy::keystone( $is_admin = undef ) { - include ::swift::deps + include swift::deps if $is_admin { warning('is_admin parameter is deprecated, has no effect and will be removed in a future release.') diff --git a/manifests/proxy/kms_keymaster.pp b/manifests/proxy/kms_keymaster.pp index 06356adc..35c71e4a 100644 --- a/manifests/proxy/kms_keymaster.pp +++ b/manifests/proxy/kms_keymaster.pp @@ -3,7 +3,7 @@ # # == Examples # -# include ::swift::proxy::kms_keymaster +# include swift::proxy::kms_keymaster # # == Parameters # @@ -14,7 +14,7 @@ class swift::proxy::kms_keymaster ( $keymaster_config_path = '/etc/swift/keymaster.conf' ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:kms_keymaster/use': value => 'egg:swift#kms_keymaster'; diff --git a/manifests/proxy/proxy_logging.pp b/manifests/proxy/proxy_logging.pp index 7759d118..706903de 100644 --- a/manifests/proxy/proxy_logging.pp +++ b/manifests/proxy/proxy_logging.pp @@ -7,7 +7,7 @@ # class swift::proxy::proxy_logging { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:proxy-logging/use': value => 'egg:swift#proxy_logging'; diff --git a/manifests/proxy/ratelimit.pp b/manifests/proxy/ratelimit.pp index 42852291..cd685466 100644 --- a/manifests/proxy/ratelimit.pp +++ b/manifests/proxy/ratelimit.pp @@ -48,7 +48,7 @@ class swift::proxy::ratelimit( $account_ratelimit = 0 ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:ratelimit/use': value => 'egg:swift#ratelimit'; diff --git a/manifests/proxy/s3api.pp b/manifests/proxy/s3api.pp index 466d1385..a1cef1e5 100644 --- a/manifests/proxy/s3api.pp +++ b/manifests/proxy/s3api.pp @@ -18,7 +18,7 @@ class swift::proxy::s3api( $auth_pipeline_check = false ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:s3api/use': value => 'egg:swift#s3api'; diff --git a/manifests/proxy/s3token.pp b/manifests/proxy/s3token.pp index 791ddbf9..cec69ecd 100644 --- a/manifests/proxy/s3token.pp +++ b/manifests/proxy/s3token.pp @@ -39,7 +39,7 @@ class swift::proxy::s3token( $auth_uri = 'http://127.0.0.1:5000' ) { - include ::swift::deps + include swift::deps if $auth_host and $auth_port and $auth_protocol { warning('Use of the auth_host, auth_port, and auth_protocol options have been deprecated in favor of auth_uri.') diff --git a/manifests/proxy/slo.pp b/manifests/proxy/slo.pp index 472f32e0..2c8c6696 100644 --- a/manifests/proxy/slo.pp +++ b/manifests/proxy/slo.pp @@ -49,7 +49,7 @@ class swift::proxy::slo ( $max_get_time = '86400' ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:slo/use': value => 'egg:swift#slo'; diff --git a/manifests/proxy/staticweb.pp b/manifests/proxy/staticweb.pp index d85e5b60..175b6f35 100644 --- a/manifests/proxy/staticweb.pp +++ b/manifests/proxy/staticweb.pp @@ -26,7 +26,7 @@ class swift::proxy::staticweb( $url_base = $::os_service_default ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:staticweb/use': value => 'egg:swift#staticweb'; diff --git a/manifests/proxy/swauth.pp b/manifests/proxy/swauth.pp index 0ca75fca..a3388cbb 100644 --- a/manifests/proxy/swauth.pp +++ b/manifests/proxy/swauth.pp @@ -21,7 +21,7 @@ class swift::proxy::swauth( $package_ensure = 'present' ) { - include ::swift::deps + include swift::deps package { 'python-swauth': ensure => $package_ensure, diff --git a/manifests/proxy/swift3.pp b/manifests/proxy/swift3.pp index b987ae9c..8c438449 100644 --- a/manifests/proxy/swift3.pp +++ b/manifests/proxy/swift3.pp @@ -24,8 +24,8 @@ class swift::proxy::swift3( $ensure = 'present' ) { - include ::swift::deps - include ::swift::params + include swift::deps + include swift::params package { 'swift-plugin-s3': ensure => $ensure, diff --git a/manifests/proxy/tempauth.pp b/manifests/proxy/tempauth.pp index 224de9bd..a5513c32 100644 --- a/manifests/proxy/tempauth.pp +++ b/manifests/proxy/tempauth.pp @@ -81,7 +81,7 @@ class swift::proxy::tempauth ( $storage_url_scheme = undef, ) { - include ::swift::deps + include swift::deps validate_legacy(Array, 'validate_array', $account_user_list) diff --git a/manifests/proxy/tempauth_account.pp b/manifests/proxy/tempauth_account.pp index 15f8f5c4..1f48b4f1 100644 --- a/manifests/proxy/tempauth_account.pp +++ b/manifests/proxy/tempauth_account.pp @@ -13,7 +13,7 @@ # define swift::proxy::tempauth_account() { - include ::swift::deps + include swift::deps # strip white space and split string into array elements around ',' $account_data = strip(split($title,',')) diff --git a/manifests/proxy/tempurl.pp b/manifests/proxy/tempurl.pp index b816f8de..d2f089ae 100644 --- a/manifests/proxy/tempurl.pp +++ b/manifests/proxy/tempurl.pp @@ -52,7 +52,7 @@ class swift::proxy::tempurl ( $outgoing_allow_headers = undef, ) { - include ::swift::deps + include swift::deps if($methods) { if is_array($methods) { diff --git a/manifests/proxy/versioned_writes.pp b/manifests/proxy/versioned_writes.pp index 2599004f..f5466fab 100644 --- a/manifests/proxy/versioned_writes.pp +++ b/manifests/proxy/versioned_writes.pp @@ -3,7 +3,7 @@ # # == Examples # -# include ::swift::proxy::versioned_writes +# include swift::proxy::versioned_writes # # == Parameters # @@ -15,7 +15,7 @@ class swift::proxy::versioned_writes ( $allow_versioned_writes = false ) { - include ::swift::deps + include swift::deps swift_proxy_config { 'filter:versioned_writes/use': value => 'egg:swift#versioned_writes'; diff --git a/manifests/ringbuilder.pp b/manifests/ringbuilder.pp index 0eaeb6f4..de11898a 100644 --- a/manifests/ringbuilder.pp +++ b/manifests/ringbuilder.pp @@ -30,7 +30,7 @@ class swift::ringbuilder( $min_part_hours = undef ) { - include ::swift::deps + include swift::deps Class['swift'] -> Class['swift::ringbuilder'] swift::ringbuilder::create{ ['object', 'account', 'container']: diff --git a/manifests/ringbuilder/create.pp b/manifests/ringbuilder/create.pp index 6d083dc5..3e203c90 100644 --- a/manifests/ringbuilder/create.pp +++ b/manifests/ringbuilder/create.pp @@ -39,7 +39,7 @@ define swift::ringbuilder::create( $user = 'swift' ) { - include ::swift::deps + include swift::deps validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name, ['^object|container|account$']) diff --git a/manifests/ringbuilder/policy_ring.pp b/manifests/ringbuilder/policy_ring.pp index 13223f16..559b9a56 100644 --- a/manifests/ringbuilder/policy_ring.pp +++ b/manifests/ringbuilder/policy_ring.pp @@ -37,7 +37,7 @@ define swift::ringbuilder::policy_ring( validate_legacy(Pattern[/^\d+$/], 'validate_re', $title, ['^\d+$']) - include ::swift::deps + include swift::deps Class['swift'] -> Swift::Ringbuilder::Policy_ring[$title] if $title == '0' { diff --git a/manifests/ringbuilder/rebalance.pp b/manifests/ringbuilder/rebalance.pp index ecc31f23..919e7d63 100644 --- a/manifests/ringbuilder/rebalance.pp +++ b/manifests/ringbuilder/rebalance.pp @@ -12,7 +12,7 @@ define swift::ringbuilder::rebalance( $seed = undef ) { - include ::swift::deps + include swift::deps validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name, ['^object|container|account$']) diff --git a/manifests/ringserver.pp b/manifests/ringserver.pp index 9f9f1959..d0b939b4 100644 --- a/manifests/ringserver.pp +++ b/manifests/ringserver.pp @@ -30,11 +30,11 @@ class swift::ringserver( $max_connections = 5 ) { - include ::swift::deps + include swift::deps Class['swift::ringbuilder'] -> Class['swift::ringserver'] if !defined(Class['rsync::server']) { - class { '::rsync::server': + class { 'rsync::server': use_xinetd => true, address => $local_net_ip, use_chroot => 'no', diff --git a/manifests/ringsync.pp b/manifests/ringsync.pp index 7a89c442..b2eee243 100644 --- a/manifests/ringsync.pp +++ b/manifests/ringsync.pp @@ -7,7 +7,7 @@ define swift::ringsync( $ring_server ) { - include ::swift::deps + include swift::deps Exec { path => '/usr/bin' } diff --git a/manifests/service.pp b/manifests/service.pp index e84f83f6..c9dcf4d0 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -48,8 +48,8 @@ define swift::service( $service_require = undef, ) { - include ::swift::deps - include ::swift::params + include swift::deps + include swift::params if(! member($::swift::params::swift_init_service_names, $name)) { fail("swift::service name: ${name} is not a valid swift_init_service_name") diff --git a/manifests/storage.pp b/manifests/storage.pp index 1f1d200e..4c2c89ea 100644 --- a/manifests/storage.pp +++ b/manifests/storage.pp @@ -23,7 +23,7 @@ class swift::storage( $storage_local_net_ip ) { - include ::swift::deps + include swift::deps if !defined(Class['rsync::server']){ class{ '::rsync::server': diff --git a/manifests/storage/account.pp b/manifests/storage/account.pp index 4c0561cb..6518d5ef 100644 --- a/manifests/storage/account.pp +++ b/manifests/storage/account.pp @@ -34,7 +34,7 @@ class swift::storage::account( $service_provider = $::swift::params::service_provider ) inherits ::swift::params { - include ::swift::deps + include swift::deps Swift_config<| |> ~> Service['swift-account-reaper'] swift::storage::generic { 'account': diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp index 05f3a531..866d33f5 100644 --- a/manifests/storage/all.pp +++ b/manifests/storage/all.pp @@ -144,7 +144,7 @@ class swift::storage::all( $splice = false, ) { - include ::swift::deps + include swift::deps if ($object_port == '6000') { warning('The default port for the object storage server has changed from 6000 to 6200 and will be changed in a later release') @@ -158,7 +158,7 @@ class swift::storage::all( warning('The default port for the account storage server has changed from 6002 to 6202 and will be changed in a later release') } - class { '::swift::storage': + class { 'swift::storage': storage_local_net_ip => $storage_local_net_ip, } diff --git a/manifests/storage/container.pp b/manifests/storage/container.pp index 8a515b84..024f9f3e 100644 --- a/manifests/storage/container.pp +++ b/manifests/storage/container.pp @@ -40,7 +40,7 @@ class swift::storage::container( $service_provider = $::swift::params::service_provider ) inherits ::swift::params { - include ::swift::deps + include swift::deps Swift_config<| |> ~> Service['swift-container-updater'] Swift_config<| |> ~> Service['swift-container-sync'] diff --git a/manifests/storage/disk.pp b/manifests/storage/disk.pp index 530a75b5..74278625 100644 --- a/manifests/storage/disk.pp +++ b/manifests/storage/disk.pp @@ -54,7 +54,7 @@ define swift::storage::disk( $ext_args = '', ) { - include ::swift::deps + include swift::deps if(!defined(File[$mnt_base_dir])) { file { $mnt_base_dir: diff --git a/manifests/storage/ext4.pp b/manifests/storage/ext4.pp index 024e9739..4b527b50 100644 --- a/manifests/storage/ext4.pp +++ b/manifests/storage/ext4.pp @@ -29,7 +29,7 @@ define swift::storage::ext4( $loopback = false ) { - include ::swift::deps + include swift::deps # does this have to be refreshonly? # how can I know if this drive has been formatted? exec { "mkfs-${name}": diff --git a/manifests/storage/filter/healthcheck.pp b/manifests/storage/filter/healthcheck.pp index 8da3cd75..745a4696 100644 --- a/manifests/storage/filter/healthcheck.pp +++ b/manifests/storage/filter/healthcheck.pp @@ -6,7 +6,7 @@ define swift::storage::filter::healthcheck( ) { - include ::swift::deps + include swift::deps concat::fragment { "swift_healthcheck_${name}": target => "/etc/swift/${name}-server.conf", diff --git a/manifests/storage/filter/recon.pp b/manifests/storage/filter/recon.pp index 65a7e4be..17dba94f 100644 --- a/manifests/storage/filter/recon.pp +++ b/manifests/storage/filter/recon.pp @@ -22,7 +22,7 @@ define swift::storage::filter::recon( $cache_path = '/var/cache/swift' ) { - include ::swift::deps + include swift::deps concat::fragment { "swift_recon_${name}": target => "/etc/swift/${name}-server.conf", diff --git a/manifests/storage/generic.pp b/manifests/storage/generic.pp index 16725710..79377c4e 100644 --- a/manifests/storage/generic.pp +++ b/manifests/storage/generic.pp @@ -38,8 +38,8 @@ define swift::storage::generic( $service_provider = $::swift::params::service_provider ) { - include ::swift::deps - include ::swift::params + include swift::deps + include swift::params Class['swift::storage'] -> Swift::Storage::Generic[$name] Swift_config<| |> ~> Service["swift-${name}-server"] diff --git a/manifests/storage/loopback.pp b/manifests/storage/loopback.pp index cc4f4726..7870ce70 100644 --- a/manifests/storage/loopback.pp +++ b/manifests/storage/loopback.pp @@ -38,7 +38,7 @@ define swift::storage::loopback( $fstype = 'xfs' ) { - include ::swift::deps + include swift::deps if(!defined(File[$base_dir])) { file { $base_dir: diff --git a/manifests/storage/mount.pp b/manifests/storage/mount.pp index 1d0dffe5..2fa2fd2f 100644 --- a/manifests/storage/mount.pp +++ b/manifests/storage/mount.pp @@ -28,7 +28,7 @@ define swift::storage::mount( $fstype = 'xfs' ) { - include ::swift::deps + include swift::deps if($loopback){ $options = 'noatime,nodiratime,nobarrier,loop' diff --git a/manifests/storage/node.pp b/manifests/storage/node.pp index 1a3f60e2..765be811 100644 --- a/manifests/storage/node.pp +++ b/manifests/storage/node.pp @@ -52,7 +52,7 @@ define swift::storage::node( $policy_index = undef, ) { - include ::swift::deps + include swift::deps validate_legacy(Integer, 'validate_re', $zone, ['^\d+$', 'The zone parameter must be an integer']) diff --git a/manifests/storage/object.pp b/manifests/storage/object.pp index e2b13ff2..d0762a20 100644 --- a/manifests/storage/object.pp +++ b/manifests/storage/object.pp @@ -34,7 +34,7 @@ class swift::storage::object( $service_provider = $::swift::params::service_provider ) inherits ::swift::params { - include ::swift::deps + include swift::deps swift::storage::generic { 'object': manage_service => $manage_service, diff --git a/manifests/storage/policy.pp b/manifests/storage/policy.pp index 8c937f20..d985137b 100644 --- a/manifests/storage/policy.pp +++ b/manifests/storage/policy.pp @@ -71,7 +71,7 @@ define swift::storage::policy( $ec_object_segment_size = undef, ) { - include ::swift::deps + include swift::deps Swift_storage_policy<| |> ~> Service<| tag == 'swift-service' |> diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 65f2d9fe..f264b4cc 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -199,7 +199,7 @@ define swift::storage::server( $splice = false, ) { - include ::swift::deps + include swift::deps if ($incoming_chmod == '0644') { warning('The default incoming_chmod set to 0644 may yield in error prone directories and will be changed in a later release.') diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index e27eca93..1dee0425 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -41,8 +41,8 @@ define swift::storage::xfs( $mount_type = 'path', ) { - include ::swift::deps - include ::swift::xfs + include swift::deps + include swift::xfs if $device == '' { $target_device = "/dev/${name}" diff --git a/manifests/test_file.pp b/manifests/test_file.pp index 3fe6e100..f76ab7c9 100644 --- a/manifests/test_file.pp +++ b/manifests/test_file.pp @@ -37,7 +37,7 @@ class swift::test_file ( $user = 'admin' ) { - include ::swift::deps + include swift::deps file { '/tmp/swift_test_file.rb': mode => '0755', diff --git a/manifests/xfs.pp b/manifests/xfs.pp index 6a44e1e2..aa8391c5 100644 --- a/manifests/xfs.pp +++ b/manifests/xfs.pp @@ -3,7 +3,7 @@ # xfs partitions class swift::xfs { - include ::swift::deps + include swift::deps $packages = ['xfsprogs', 'parted'] ensure_packages($packages) diff --git a/spec/acceptance/basic_swift_spec.rb b/spec/acceptance/basic_swift_spec.rb index 7348de66..2f3ddcf4 100644 --- a/spec/acceptance/basic_swift_spec.rb +++ b/spec/acceptance/basic_swift_spec.rb @@ -6,11 +6,11 @@ describe 'basic swift' 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 exec { 'setenforce 0': path => '/bin:/sbin:/usr/bin:/usr/sbin', @@ -20,21 +20,21 @@ describe 'basic swift' do package { 'curl': ensure => present } - class { '::memcached': + class { 'memcached': listen_ip => '127.0.0.1', } # Swift resources - class { '::swift': + class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => 'secrete', package_ensure => latest, } - class { '::swift::keystone::auth': + class { 'swift::keystone::auth': password => 'a_big_secret', } # === Configure Storage - class { '::swift::storage': + class { 'swift::storage': storage_local_net_ip => '127.0.0.1', } # create xfs partitions on a loopback device and mounts them @@ -84,7 +84,7 @@ describe 'basic swift' do weight => 1, require => Swift::Storage::Loopback['4'] , } - class { '::swift::ringbuilder': + class { 'swift::ringbuilder': part_power => '18', replicas => '1', min_part_hours => 1, @@ -94,15 +94,15 @@ describe 'basic swift' do replicas => '3', min_part_hours => 1, } - class { '::swift::proxy': + class { 'swift::proxy': proxy_local_net_ip => '127.0.0.1', pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'], account_autocreate => true, } - class { '::swift::proxy::authtoken': + class { 'swift::proxy::authtoken': password => 'a_big_secret', } - class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': } + class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': } class {'::swift::objectexpirer': interval => 600, } @@ -129,11 +129,11 @@ describe 'basic swift' do it 'should work with no errors' do swiftinit_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 exec { 'setenforce 0': path => '/bin:/sbin:/usr/bin:/usr/sbin', @@ -143,21 +143,21 @@ describe 'basic swift' do package { 'curl': ensure => present } - class { '::memcached': + class { 'memcached': listen_ip => '127.0.0.1', } # Swift resources - class { '::swift': + class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => 'secrete', package_ensure => latest, } - class { '::swift::keystone::auth': + class { 'swift::keystone::auth': password => 'a_big_secret', } # === Configure Storage - class { '::swift::storage': + class { 'swift::storage': storage_local_net_ip => '127.0.0.1', } # create xfs partitions on a loopback device and mounts them @@ -207,16 +207,16 @@ describe 'basic swift' do weight => 1, require => Swift::Storage::Loopback['4'] , } - class { '::swift::storage::account': + class { 'swift::storage::account': service_provider => 'swiftinit', } - class { '::swift::storage::container': + class { 'swift::storage::container': service_provider => 'swiftinit', } - class { '::swift::storage::object': + class { 'swift::storage::object': service_provider => 'swiftinit', } - class { '::swift::ringbuilder': + class { 'swift::ringbuilder': part_power => '18', replicas => '1', min_part_hours => 1, @@ -226,16 +226,16 @@ describe 'basic swift' do replicas => '3', min_part_hours => 1, } - class { '::swift::proxy': + class { 'swift::proxy': proxy_local_net_ip => '127.0.0.1', pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'], account_autocreate => true, service_provider => 'swiftinit', } - class { '::swift::proxy::authtoken': + class { 'swift::proxy::authtoken': admin_password => 'a_big_secret', } - class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': } + class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': } class {'::swift::objectexpirer': interval => 600, service_provider => 'swiftinit', diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index c5458fb9..c1f0dfe5 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -10,9 +10,9 @@ describe 'swift::proxy' do let :pre_condition do "class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } - include ::swift::proxy::healthcheck - include ::swift::proxy::cache - include ::swift::proxy::tempauth" + include swift::proxy::healthcheck + include swift::proxy::cache + include swift::proxy::tempauth" end describe 'without the proxy local network ip address being specified' do @@ -82,9 +82,9 @@ describe 'swift::proxy' do class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } swift_proxy_config { 'foo/bar': value => 'foo' } - include ::swift::proxy::healthcheck - include ::swift::proxy::cache - include ::swift::proxy::tempauth + include swift::proxy::healthcheck + include swift::proxy::cache + include swift::proxy::tempauth " end @@ -95,7 +95,7 @@ describe 'swift::proxy' do let :pre_condition do "class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } - include ::swift::proxy::swauth" + include swift::proxy::swauth" end let :params do @@ -201,7 +201,7 @@ describe 'swift::proxy' do let :pre_condition do "class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } - include ::swift::proxy::swauth" + include swift::proxy::swauth" end it { should contain_swift_proxy_config('DEFAULT/bind_port').with_value('80') } @@ -267,9 +267,9 @@ describe 'swift::proxy' do let :pre_condition do "class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } - include ::swift::proxy::healthcheck - include ::swift::proxy::cache - include ::swift::proxy::tempauth" + include swift::proxy::healthcheck + include swift::proxy::cache + include swift::proxy::tempauth" end