Convert all class usage to relative names

Change-Id: I0335cf49c2ce55659c49325f2c0028f1af93705d
This commit is contained in:
Tobias Urdin 2019-12-08 23:21:35 +01:00
parent 14d1bda0b3
commit 0868b32e79
72 changed files with 153 additions and 153 deletions

View File

@ -169,7 +169,7 @@ The existing storage node and ringbuilder manifest will be:
} }
# Build the existing ring # Build the existing ring
class { '::swift::ringbuilder': class { 'swift::ringbuilder':
part_power => '14', part_power => '14',
replicas => '1', replicas => '1',
min_part_hours => 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. Configures [DLO middleware](https://docs.openstack.org/swift/latest/middleware.html#module-swift.common.middleware.dlo) for swift proxy.
```puppet ```puppet
class { '::swift::proxy::dlo': class { 'swift::proxy::dlo':
rate_limit_after_segment => '10', rate_limit_after_segment => '10',
rate_limit_segments_per_sec => '1', rate_limit_segments_per_sec => '1',
max_get_time => '86400' 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. * To use the swiftinit service provider set "service_provider" on the supported components you have defined in your config manifest.
```puppet ```puppet
class { '::swift::storage::account': class { 'swift::storage::account':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::container': class { 'swift::storage::container':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::object': class { 'swift::storage::object':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class {'::swift::objectexpirer': class {'::swift::objectexpirer':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::proxy': class { 'swift::proxy':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
``` ```

View File

@ -11,11 +11,11 @@ Exec { logoutput => true }
package { 'curl': ensure => present } package { 'curl': ensure => present }
class { '::memcached': class { 'memcached':
listen_ip => $swift_local_net_ip, listen_ip => $swift_local_net_ip,
} }
class { '::swift': class { 'swift':
# not sure how I want to deal with this shared secret # not sure how I want to deal with this shared secret
swift_hash_path_suffix => $swift_shared_secret, swift_hash_path_suffix => $swift_shared_secret,
package_ensure => latest, package_ensure => latest,
@ -23,7 +23,7 @@ class { '::swift':
# === Configure Storage # === Configure Storage
class { '::swift::storage': class { 'swift::storage':
storage_local_net_ip => $swift_local_net_ip, storage_local_net_ip => $swift_local_net_ip,
} }
@ -44,7 +44,7 @@ swift::storage::node { '2':
require => Swift::Storage::Loopback[2] , require => Swift::Storage::Loopback[2] ,
} }
class { '::swift::ringbuilder': class { 'swift::ringbuilder':
part_power => '18', part_power => '18',
replicas => '1', replicas => '1',
min_part_hours => 1, min_part_hours => 1,
@ -53,7 +53,7 @@ class { '::swift::ringbuilder':
# TODO should I enable swath in the default config? # TODO should I enable swath in the default config?
class { '::swift::proxy': class { 'swift::proxy':
proxy_local_net_ip => $swift_local_net_ip, proxy_local_net_ip => $swift_local_net_ip,
pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'], pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
account_autocreate => true, account_autocreate => true,
@ -61,7 +61,7 @@ class { '::swift::proxy':
} }
class { ['::swift::proxy::healthcheck', '::swift::proxy::cache']: } class { ['::swift::proxy::healthcheck', '::swift::proxy::cache']: }
class { '::swift::proxy::tempauth': class { 'swift::proxy::tempauth':
account_user_list => [ account_user_list => [
{ {
'user' => 'admin', 'user' => 'admin',

View File

@ -69,7 +69,7 @@ $swift_keystone_admin_password = hiera('admin_password', 'ChangeMe')
node 'swift-keystone' { node 'swift-keystone' {
# set up mysql server # set up mysql server
class { '::mysql::server': class { 'mysql::server':
config_hash => { config_hash => {
# the priv grant fails on precise if I set a root password # the priv grant fails on precise if I set a root password
# TODO I should make sure that this works # TODO I should make sure that this works
@ -83,11 +83,11 @@ node 'swift-keystone' {
} }
# set up all openstack databases, users, grants # set up all openstack databases, users, grants
class { '::keystone::db::mysql': class { 'keystone::db::mysql':
password => $swift_keystone_db_password, password => $swift_keystone_db_password,
} }
class { '::keystone': class { 'keystone':
debug => $debug, debug => $debug,
catalog_type => 'sql', catalog_type => 'sql',
admin_password => $swift_keystone_admin_password, admin_password => $swift_keystone_admin_password,
@ -96,15 +96,15 @@ node 'swift-keystone' {
} }
# Setup the Keystone Identity Endpoint # Setup the Keystone Identity Endpoint
class { '::keystone::endpoint': } class { 'keystone::endpoint': }
# set up keystone admin users # set up keystone admin users
class { '::keystone::roles::admin': class { 'keystone::roles::admin':
email => $swift_keystone_admin_email, email => $swift_keystone_admin_email,
password => $swift_keystone_admin_password, password => $swift_keystone_admin_password,
} }
# configure the keystone service user and endpoint # configure the keystone service user and endpoint
class { '::swift::keystone::auth': class { 'swift::keystone::auth':
password => $swift_admin_password, password => $swift_admin_password,
public_address => $swift_proxy_node, public_address => $swift_proxy_node,
} }
@ -121,7 +121,7 @@ node 'swift-keystone' {
# #
node /swift-storage/ { node /swift-storage/ {
class { '::swift': class { 'swift':
# not sure how I want to deal with this shared secret # not sure how I want to deal with this shared secret
swift_hash_path_suffix => $swift_shared_secret, swift_hash_path_suffix => $swift_shared_secret,
package_ensure => latest, package_ensure => latest,
@ -139,7 +139,7 @@ node /swift-storage/ {
swift::storage::filter::healthcheck { $rings: } swift::storage::filter::healthcheck { $rings: }
# install all swift storage servers together # install all swift storage servers together
class { '::swift::storage::all': class { 'swift::storage::all':
storage_local_net_ip => $swift_local_net_ip, storage_local_net_ip => $swift_local_net_ip,
object_pipeline => $object_pipeline, object_pipeline => $object_pipeline,
container_pipeline => $container_pipeline, container_pipeline => $container_pipeline,
@ -185,7 +185,7 @@ node /swift-storage/ {
node /swift-proxy/ { node /swift-proxy/ {
class { '::swift': class { 'swift':
# not sure how I want to deal with this shared secret # not sure how I want to deal with this shared secret
swift_hash_path_suffix => $swift_shared_secret, swift_hash_path_suffix => $swift_shared_secret,
package_ensure => latest, package_ensure => latest,
@ -194,12 +194,12 @@ node /swift-proxy/ {
# curl is only required so that I can run tests # curl is only required so that I can run tests
package { 'curl': ensure => present } package { 'curl': ensure => present }
class { '::memcached': class { 'memcached':
listen_ip => '127.0.0.1', listen_ip => '127.0.0.1',
} }
# specify swift proxy and all of its middlewares # specify swift proxy and all of its middlewares
class { '::swift::proxy': class { 'swift::proxy':
proxy_local_net_ip => $swift_local_net_ip, proxy_local_net_ip => $swift_local_net_ip,
pipeline => [ pipeline => [
'bulk', 'bulk',
@ -228,28 +228,28 @@ node /swift-proxy/ {
'::swift::proxy::cache', '::swift::proxy::cache',
'::swift::proxy::swift3', '::swift::proxy::swift3',
]: } ]: }
class { '::swift::proxy::bulk': class { 'swift::proxy::bulk':
max_containers_per_extraction => 10000, max_containers_per_extraction => 10000,
max_failed_extractions => 1000, max_failed_extractions => 1000,
max_deletes_per_request => 10000, max_deletes_per_request => 10000,
yield_frequency => 60, yield_frequency => 60,
} }
class { '::swift::proxy::ratelimit': class { 'swift::proxy::ratelimit':
clock_accuracy => 1000, clock_accuracy => 1000,
max_sleep_time_seconds => 60, max_sleep_time_seconds => 60,
log_sleep_time_seconds => 0, log_sleep_time_seconds => 0,
rate_buffer_seconds => 5, rate_buffer_seconds => 5,
account_ratelimit => 0, account_ratelimit => 0,
} }
class { '::swift::proxy::s3token': class { 'swift::proxy::s3token':
# assume that the controller host is the swift api server # assume that the controller host is the swift api server
auth_host => $swift_keystone_node, auth_host => $swift_keystone_node,
auth_port => '5000', auth_port => '5000',
} }
class { '::swift::proxy::keystone': class { 'swift::proxy::keystone':
operator_roles => ['admin', 'SwiftOperator'], operator_roles => ['admin', 'SwiftOperator'],
} }
class { '::swift::proxy::authtoken': class { 'swift::proxy::authtoken':
password => $swift_admin_password, password => $swift_admin_password,
# assume that the controller host is the swift api server # assume that the controller host is the swift api server
auth_host => $swift_keystone_node, auth_host => $swift_keystone_node,
@ -262,7 +262,7 @@ node /swift-proxy/ {
Ring_account_device <<| |>> Ring_account_device <<| |>>
# create the ring # create the ring
class { '::swift::ringbuilder': class { 'swift::ringbuilder':
# the part power should be determined by assuming 100 partitions per drive # the part power should be determined by assuming 100 partitions per drive
part_power => '18', part_power => '18',
replicas => '3', replicas => '3',
@ -271,7 +271,7 @@ node /swift-proxy/ {
} }
# sets up an rsync db that can be used to sync the ring DB # 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, local_net_ip => $swift_local_net_ip,
} }
@ -281,7 +281,7 @@ node /swift-proxy/ {
} }
# deploy a script that can be used for testing # deploy a script that can be used for testing
class { '::swift::test_file': class { 'swift::test_file':
auth_server => $swift_keystone_node, auth_server => $swift_keystone_node,
password => $swift_keystone_admin_password, password => $swift_keystone_admin_password,
} }

View File

@ -25,7 +25,7 @@ class swift::auth_file (
$auth_url = 'http://127.0.0.1:5000/v3/' $auth_url = 'http://127.0.0.1:5000/v3/'
) { ) {
include ::swift::deps include swift::deps
file { '/root/swiftrc': file { '/root/swiftrc':
ensure => file, ensure => file,

View File

@ -84,7 +84,7 @@ class swift::bench (
$delete = 'yes', $delete = 'yes',
){ ){
include ::swift::deps include swift::deps
swift_bench_config { swift_bench_config {
'bench/auth': value => $auth_url; 'bench/auth': value => $auth_url;

View File

@ -12,8 +12,8 @@ class swift::client (
$ensure = 'present', $ensure = 'present',
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
package { 'swiftclient': package { 'swiftclient':
ensure => $ensure, ensure => $ensure,

View File

@ -34,7 +34,7 @@ class swift::config (
$swift_proxy_config = {}, $swift_proxy_config = {},
) { ) {
include ::swift::deps include swift::deps
validate_legacy(Hash, 'validate_hash', $swift_config) validate_legacy(Hash, 'validate_hash', $swift_config)
validate_legacy(Hash, 'validate_hash', $swift_container_sync_realms_config) validate_legacy(Hash, 'validate_hash', $swift_container_sync_realms_config)

View File

@ -60,7 +60,7 @@ class swift::containerreconciler(
$memcache_servers = ['127.0.0.1:11211'], $memcache_servers = ['127.0.0.1:11211'],
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
Swift_config<| |> ~> Service['swift-container-reconciler'] Swift_config<| |> ~> Service['swift-container-reconciler']
Swift_container_reconciler_config<||> ~> Service['swift-container-reconciler'] Swift_container_reconciler_config<||> ~> Service['swift-container-reconciler']

View File

@ -80,8 +80,8 @@ class swift::dispersion (
$dump_json = 'no' $dump_json = 'no'
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
Swift_dispersion_config<||> ~> Exec['swift-dispersion-populate'] Swift_dispersion_config<||> ~> Exec['swift-dispersion-populate']

View File

@ -59,9 +59,9 @@ class swift(
$client_package_ensure = undef, $client_package_ensure = undef,
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
include ::swift::client include swift::client
if $client_package_ensure { if $client_package_ensure {
warning('swift::client_package_ensure is deprecated and has no effect') warning('swift::client_package_ensure is deprecated and has no effect')

View File

@ -78,7 +78,7 @@ class swift::keymaster(
$user_domain_id = 'default', $user_domain_id = 'default',
) { ) {
include ::swift::deps include swift::deps
swift_keymaster_config { swift_keymaster_config {
'kms_keymaster/api_class': value => $api_class; 'kms_keymaster/api_class': value => $api_class;

View File

@ -110,7 +110,7 @@ class swift::keystone::auth(
$internal_url_s3 = 'http://127.0.0.1:8080', $internal_url_s3 = 'http://127.0.0.1:8080',
) { ) {
include ::swift::deps include swift::deps
if $service_name == $service_name_s3 { if $service_name == $service_name_s3 {
fail('swift::keystone::auth parameters service_name and service_name_s3 must be different.') fail('swift::keystone::auth parameters service_name and service_name_s3 must be different.')

View File

@ -36,7 +36,7 @@ class swift::keystone::dispersion(
$tenant = 'services' $tenant = 'services'
) { ) {
include ::swift::deps include swift::deps
keystone_user { $auth_user: keystone_user { $auth_user:
ensure => present, ensure => present,

View File

@ -99,7 +99,7 @@ class swift::objectexpirer(
$log_facility = 'LOG_LOCAL2', $log_facility = 'LOG_LOCAL2',
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
Swift_config<| |> ~> Service['swift-object-expirer'] Swift_config<| |> ~> Service['swift-object-expirer']
Swift_object_expirer_config<||> ~> Service['swift-object-expirer'] Swift_object_expirer_config<||> ~> Service['swift-object-expirer']

View File

@ -3,7 +3,7 @@
# Parameters for puppet-swift # Parameters for puppet-swift
# #
class swift::params { class swift::params {
include ::openstacklib::defaults include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers $pyvers = $::openstacklib::defaults::pyvers
$client_package = "python${pyvers}-swiftclient" $client_package = "python${pyvers}-swiftclient"

View File

@ -182,7 +182,7 @@ class swift::proxy(
$purge_config = false, $purge_config = false,
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
Swift_config<| |> ~> Service['swift-proxy-server'] Swift_config<| |> ~> Service['swift-proxy-server']
validate_legacy(Boolean, 'validate_bool', $account_autocreate) validate_legacy(Boolean, 'validate_bool', $account_autocreate)

View File

@ -19,7 +19,7 @@
# #
class swift::proxy::account_quotas() { class swift::proxy::account_quotas() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:account_quotas/use': value => 'egg:swift#account_quotas'; 'filter:account_quotas/use': value => 'egg:swift#account_quotas';

View File

@ -106,7 +106,7 @@ class swift::proxy::authtoken(
$auth_uri = undef, $auth_uri = undef,
) inherits swift::params { ) inherits swift::params {
include ::swift::deps include swift::deps
if $identity_uri { if $identity_uri {
warning('identity_uri is deprecated and will be removed, please use auth_url instead') warning('identity_uri is deprecated and will be removed, please use auth_url instead')

View File

@ -44,7 +44,7 @@ class swift::proxy::bulk(
$yield_frequency = '60', $yield_frequency = '60',
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:bulk/use': value => 'egg:swift#bulk'; 'filter:bulk/use': value => 'egg:swift#bulk';

View File

@ -26,7 +26,7 @@ class swift::proxy::cache(
$memcache_max_connections = '2' $memcache_max_connections = '2'
) { ) {
include ::swift::deps include swift::deps
# require the memcached class if its on the same machine # require the memcached class if its on the same machine
if !empty(grep(any2array($memcache_servers), '127.0.0.1')) { if !empty(grep(any2array($memcache_servers), '127.0.0.1')) {

View File

@ -17,7 +17,7 @@
# #
class swift::proxy::catch_errors() { class swift::proxy::catch_errors() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:catch_errors/use': value => 'egg:swift#catch_errors'; 'filter:catch_errors/use': value => 'egg:swift#catch_errors';

View File

@ -137,7 +137,7 @@ class swift::proxy::ceilometer(
$kombu_ssl_version = $::os_service_default, $kombu_ssl_version = $::os_service_default,
) inherits swift { ) inherits swift {
include ::swift::deps include swift::deps
User['swift'] { User['swift'] {
groups +> $group, groups +> $group,

View File

@ -19,7 +19,7 @@
# #
class swift::proxy::container_quotas() { class swift::proxy::container_quotas() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:container_quotas/use': value => 'egg:swift#container_quotas'; 'filter:container_quotas/use': value => 'egg:swift#container_quotas';

View File

@ -7,7 +7,7 @@
# #
class swift::proxy::container_sync() { class swift::proxy::container_sync() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:container_sync/use': value => 'egg:swift#container_sync'; 'filter:container_sync/use': value => 'egg:swift#container_sync';

View File

@ -3,7 +3,7 @@
# #
# == Examples # == Examples
# #
# include ::swift::proxy::copy # include swift::proxy::copy
# #
# == Parameters # == Parameters
# #
@ -19,7 +19,7 @@ class swift::proxy::copy (
$object_post_as_copy = true $object_post_as_copy = true
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:copy/use': value => 'egg:swift#copy'; 'filter:copy/use': value => 'egg:swift#copy';

View File

@ -15,7 +15,7 @@ class swift::proxy::crossdomain (
$cross_domain_policy = '<allow-access-from domain="*" secure="false" />', $cross_domain_policy = '<allow-access-from domain="*" secure="false" />',
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:crossdomain/use': value => 'egg:swift#crossdomain'; 'filter:crossdomain/use': value => 'egg:swift#crossdomain';

View File

@ -3,7 +3,7 @@
# #
# == Examples # == Examples
# #
# include ::swift::proxy::dlo # include swift::proxy::dlo
# #
# == Parameters # == Parameters
# #
@ -34,7 +34,7 @@ class swift::proxy::dlo (
$max_get_time = '86400' $max_get_time = '86400'
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:dlo/use': value => 'egg:swift#dlo'; 'filter:dlo/use': value => 'egg:swift#dlo';

View File

@ -3,7 +3,7 @@
# #
# == Examples # == Examples
# #
# include ::swift::proxy::encryption # include swift::proxy::encryption
# #
# == Parameters # == Parameters
# #
@ -17,7 +17,7 @@ class swift::proxy::encryption (
$disable_encryption = false $disable_encryption = false
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:encryption/use': value => 'egg:swift#encryption'; 'filter:encryption/use': value => 'egg:swift#encryption';

View File

@ -17,7 +17,7 @@
# #
class swift::proxy::formpost() { class swift::proxy::formpost() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:formpost/use': value => 'egg:swift#formpost'; 'filter:formpost/use': value => 'egg:swift#formpost';

View File

@ -43,7 +43,7 @@ class swift::proxy::gatekeeper(
$log_address = '/dev/log' $log_address = '/dev/log'
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:gatekeeper/use': value => 'egg:swift#gatekeeper'; 'filter:gatekeeper/use': value => 'egg:swift#gatekeeper';

View File

@ -15,7 +15,7 @@
# #
class swift::proxy::healthcheck() { class swift::proxy::healthcheck() {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:healthcheck/use': value => 'egg:swift#healthcheck'; 'filter:healthcheck/use': value => 'egg:swift#healthcheck';

View File

@ -37,7 +37,7 @@ class swift::proxy::keystone(
$is_admin = undef $is_admin = undef
) { ) {
include ::swift::deps include swift::deps
if $is_admin { if $is_admin {
warning('is_admin parameter is deprecated, has no effect and will be removed in a future release.') warning('is_admin parameter is deprecated, has no effect and will be removed in a future release.')

View File

@ -3,7 +3,7 @@
# #
# == Examples # == Examples
# #
# include ::swift::proxy::kms_keymaster # include swift::proxy::kms_keymaster
# #
# == Parameters # == Parameters
# #
@ -14,7 +14,7 @@ class swift::proxy::kms_keymaster (
$keymaster_config_path = '/etc/swift/keymaster.conf' $keymaster_config_path = '/etc/swift/keymaster.conf'
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:kms_keymaster/use': value => 'egg:swift#kms_keymaster'; 'filter:kms_keymaster/use': value => 'egg:swift#kms_keymaster';

View File

@ -7,7 +7,7 @@
# #
class swift::proxy::proxy_logging { class swift::proxy::proxy_logging {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:proxy-logging/use': value => 'egg:swift#proxy_logging'; 'filter:proxy-logging/use': value => 'egg:swift#proxy_logging';

View File

@ -48,7 +48,7 @@ class swift::proxy::ratelimit(
$account_ratelimit = 0 $account_ratelimit = 0
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:ratelimit/use': value => 'egg:swift#ratelimit'; 'filter:ratelimit/use': value => 'egg:swift#ratelimit';

View File

@ -18,7 +18,7 @@ class swift::proxy::s3api(
$auth_pipeline_check = false $auth_pipeline_check = false
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:s3api/use': value => 'egg:swift#s3api'; 'filter:s3api/use': value => 'egg:swift#s3api';

View File

@ -39,7 +39,7 @@ class swift::proxy::s3token(
$auth_uri = 'http://127.0.0.1:5000' $auth_uri = 'http://127.0.0.1:5000'
) { ) {
include ::swift::deps include swift::deps
if $auth_host and $auth_port and $auth_protocol { 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.') warning('Use of the auth_host, auth_port, and auth_protocol options have been deprecated in favor of auth_uri.')

View File

@ -49,7 +49,7 @@ class swift::proxy::slo (
$max_get_time = '86400' $max_get_time = '86400'
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:slo/use': value => 'egg:swift#slo'; 'filter:slo/use': value => 'egg:swift#slo';

View File

@ -26,7 +26,7 @@ class swift::proxy::staticweb(
$url_base = $::os_service_default $url_base = $::os_service_default
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:staticweb/use': value => 'egg:swift#staticweb'; 'filter:staticweb/use': value => 'egg:swift#staticweb';

View File

@ -21,7 +21,7 @@ class swift::proxy::swauth(
$package_ensure = 'present' $package_ensure = 'present'
) { ) {
include ::swift::deps include swift::deps
package { 'python-swauth': package { 'python-swauth':
ensure => $package_ensure, ensure => $package_ensure,

View File

@ -24,8 +24,8 @@ class swift::proxy::swift3(
$ensure = 'present' $ensure = 'present'
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
package { 'swift-plugin-s3': package { 'swift-plugin-s3':
ensure => $ensure, ensure => $ensure,

View File

@ -81,7 +81,7 @@ class swift::proxy::tempauth (
$storage_url_scheme = undef, $storage_url_scheme = undef,
) { ) {
include ::swift::deps include swift::deps
validate_legacy(Array, 'validate_array', $account_user_list) validate_legacy(Array, 'validate_array', $account_user_list)

View File

@ -13,7 +13,7 @@
# #
define swift::proxy::tempauth_account() { define swift::proxy::tempauth_account() {
include ::swift::deps include swift::deps
# strip white space and split string into array elements around ',' # strip white space and split string into array elements around ','
$account_data = strip(split($title,',')) $account_data = strip(split($title,','))

View File

@ -52,7 +52,7 @@ class swift::proxy::tempurl (
$outgoing_allow_headers = undef, $outgoing_allow_headers = undef,
) { ) {
include ::swift::deps include swift::deps
if($methods) { if($methods) {
if is_array($methods) { if is_array($methods) {

View File

@ -3,7 +3,7 @@
# #
# == Examples # == Examples
# #
# include ::swift::proxy::versioned_writes # include swift::proxy::versioned_writes
# #
# == Parameters # == Parameters
# #
@ -15,7 +15,7 @@ class swift::proxy::versioned_writes (
$allow_versioned_writes = false $allow_versioned_writes = false
) { ) {
include ::swift::deps include swift::deps
swift_proxy_config { swift_proxy_config {
'filter:versioned_writes/use': value => 'egg:swift#versioned_writes'; 'filter:versioned_writes/use': value => 'egg:swift#versioned_writes';

View File

@ -30,7 +30,7 @@ class swift::ringbuilder(
$min_part_hours = undef $min_part_hours = undef
) { ) {
include ::swift::deps include swift::deps
Class['swift'] -> Class['swift::ringbuilder'] Class['swift'] -> Class['swift::ringbuilder']
swift::ringbuilder::create{ ['object', 'account', 'container']: swift::ringbuilder::create{ ['object', 'account', 'container']:

View File

@ -39,7 +39,7 @@ define swift::ringbuilder::create(
$user = 'swift' $user = 'swift'
) { ) {
include ::swift::deps include swift::deps
validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name, validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name,
['^object|container|account$']) ['^object|container|account$'])

View File

@ -37,7 +37,7 @@ define swift::ringbuilder::policy_ring(
validate_legacy(Pattern[/^\d+$/], 'validate_re', $title, ['^\d+$']) validate_legacy(Pattern[/^\d+$/], 'validate_re', $title, ['^\d+$'])
include ::swift::deps include swift::deps
Class['swift'] -> Swift::Ringbuilder::Policy_ring[$title] Class['swift'] -> Swift::Ringbuilder::Policy_ring[$title]
if $title == '0' { if $title == '0' {

View File

@ -12,7 +12,7 @@ define swift::ringbuilder::rebalance(
$seed = undef $seed = undef
) { ) {
include ::swift::deps include swift::deps
validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name, validate_legacy(Enum['object', 'container', 'account'], 'validate_re', $name,
['^object|container|account$']) ['^object|container|account$'])

View File

@ -30,11 +30,11 @@ class swift::ringserver(
$max_connections = 5 $max_connections = 5
) { ) {
include ::swift::deps include swift::deps
Class['swift::ringbuilder'] -> Class['swift::ringserver'] Class['swift::ringbuilder'] -> Class['swift::ringserver']
if !defined(Class['rsync::server']) { if !defined(Class['rsync::server']) {
class { '::rsync::server': class { 'rsync::server':
use_xinetd => true, use_xinetd => true,
address => $local_net_ip, address => $local_net_ip,
use_chroot => 'no', use_chroot => 'no',

View File

@ -7,7 +7,7 @@ define swift::ringsync(
$ring_server $ring_server
) { ) {
include ::swift::deps include swift::deps
Exec { path => '/usr/bin' } Exec { path => '/usr/bin' }

View File

@ -48,8 +48,8 @@ define swift::service(
$service_require = undef, $service_require = undef,
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
if(! member($::swift::params::swift_init_service_names, $name)) { if(! member($::swift::params::swift_init_service_names, $name)) {
fail("swift::service name: ${name} is not a valid swift_init_service_name") fail("swift::service name: ${name} is not a valid swift_init_service_name")

View File

@ -23,7 +23,7 @@ class swift::storage(
$storage_local_net_ip $storage_local_net_ip
) { ) {
include ::swift::deps include swift::deps
if !defined(Class['rsync::server']){ if !defined(Class['rsync::server']){
class{ '::rsync::server': class{ '::rsync::server':

View File

@ -34,7 +34,7 @@ class swift::storage::account(
$service_provider = $::swift::params::service_provider $service_provider = $::swift::params::service_provider
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
Swift_config<| |> ~> Service['swift-account-reaper'] Swift_config<| |> ~> Service['swift-account-reaper']
swift::storage::generic { 'account': swift::storage::generic { 'account':

View File

@ -144,7 +144,7 @@ class swift::storage::all(
$splice = false, $splice = false,
) { ) {
include ::swift::deps include swift::deps
if ($object_port == '6000') { 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') 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') 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, storage_local_net_ip => $storage_local_net_ip,
} }

View File

@ -40,7 +40,7 @@ class swift::storage::container(
$service_provider = $::swift::params::service_provider $service_provider = $::swift::params::service_provider
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
Swift_config<| |> ~> Service['swift-container-updater'] Swift_config<| |> ~> Service['swift-container-updater']
Swift_config<| |> ~> Service['swift-container-sync'] Swift_config<| |> ~> Service['swift-container-sync']

View File

@ -54,7 +54,7 @@ define swift::storage::disk(
$ext_args = '', $ext_args = '',
) { ) {
include ::swift::deps include swift::deps
if(!defined(File[$mnt_base_dir])) { if(!defined(File[$mnt_base_dir])) {
file { $mnt_base_dir: file { $mnt_base_dir:

View File

@ -29,7 +29,7 @@ define swift::storage::ext4(
$loopback = false $loopback = false
) { ) {
include ::swift::deps include swift::deps
# does this have to be refreshonly? # does this have to be refreshonly?
# how can I know if this drive has been formatted? # how can I know if this drive has been formatted?
exec { "mkfs-${name}": exec { "mkfs-${name}":

View File

@ -6,7 +6,7 @@
define swift::storage::filter::healthcheck( define swift::storage::filter::healthcheck(
) { ) {
include ::swift::deps include swift::deps
concat::fragment { "swift_healthcheck_${name}": concat::fragment { "swift_healthcheck_${name}":
target => "/etc/swift/${name}-server.conf", target => "/etc/swift/${name}-server.conf",

View File

@ -22,7 +22,7 @@ define swift::storage::filter::recon(
$cache_path = '/var/cache/swift' $cache_path = '/var/cache/swift'
) { ) {
include ::swift::deps include swift::deps
concat::fragment { "swift_recon_${name}": concat::fragment { "swift_recon_${name}":
target => "/etc/swift/${name}-server.conf", target => "/etc/swift/${name}-server.conf",

View File

@ -38,8 +38,8 @@ define swift::storage::generic(
$service_provider = $::swift::params::service_provider $service_provider = $::swift::params::service_provider
) { ) {
include ::swift::deps include swift::deps
include ::swift::params include swift::params
Class['swift::storage'] -> Swift::Storage::Generic[$name] Class['swift::storage'] -> Swift::Storage::Generic[$name]
Swift_config<| |> ~> Service["swift-${name}-server"] Swift_config<| |> ~> Service["swift-${name}-server"]

View File

@ -38,7 +38,7 @@ define swift::storage::loopback(
$fstype = 'xfs' $fstype = 'xfs'
) { ) {
include ::swift::deps include swift::deps
if(!defined(File[$base_dir])) { if(!defined(File[$base_dir])) {
file { $base_dir: file { $base_dir:

View File

@ -28,7 +28,7 @@ define swift::storage::mount(
$fstype = 'xfs' $fstype = 'xfs'
) { ) {
include ::swift::deps include swift::deps
if($loopback){ if($loopback){
$options = 'noatime,nodiratime,nobarrier,loop' $options = 'noatime,nodiratime,nobarrier,loop'

View File

@ -52,7 +52,7 @@ define swift::storage::node(
$policy_index = undef, $policy_index = undef,
) { ) {
include ::swift::deps include swift::deps
validate_legacy(Integer, 'validate_re', $zone, validate_legacy(Integer, 'validate_re', $zone,
['^\d+$', 'The zone parameter must be an integer']) ['^\d+$', 'The zone parameter must be an integer'])

View File

@ -34,7 +34,7 @@ class swift::storage::object(
$service_provider = $::swift::params::service_provider $service_provider = $::swift::params::service_provider
) inherits ::swift::params { ) inherits ::swift::params {
include ::swift::deps include swift::deps
swift::storage::generic { 'object': swift::storage::generic { 'object':
manage_service => $manage_service, manage_service => $manage_service,

View File

@ -71,7 +71,7 @@ define swift::storage::policy(
$ec_object_segment_size = undef, $ec_object_segment_size = undef,
) { ) {
include ::swift::deps include swift::deps
Swift_storage_policy<| |> ~> Service<| tag == 'swift-service' |> Swift_storage_policy<| |> ~> Service<| tag == 'swift-service' |>

View File

@ -199,7 +199,7 @@ define swift::storage::server(
$splice = false, $splice = false,
) { ) {
include ::swift::deps include swift::deps
if ($incoming_chmod == '0644') { 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.') warning('The default incoming_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')

View File

@ -41,8 +41,8 @@ define swift::storage::xfs(
$mount_type = 'path', $mount_type = 'path',
) { ) {
include ::swift::deps include swift::deps
include ::swift::xfs include swift::xfs
if $device == '' { if $device == '' {
$target_device = "/dev/${name}" $target_device = "/dev/${name}"

View File

@ -37,7 +37,7 @@ class swift::test_file (
$user = 'admin' $user = 'admin'
) { ) {
include ::swift::deps include swift::deps
file { '/tmp/swift_test_file.rb': file { '/tmp/swift_test_file.rb':
mode => '0755', mode => '0755',

View File

@ -3,7 +3,7 @@
# xfs partitions # xfs partitions
class swift::xfs { class swift::xfs {
include ::swift::deps include swift::deps
$packages = ['xfsprogs', 'parted'] $packages = ['xfsprogs', 'parted']
ensure_packages($packages) ensure_packages($packages)

View File

@ -6,11 +6,11 @@ describe 'basic swift' do
it 'should work with no errors' do it 'should work with no errors' do
pp= <<-EOS pp= <<-EOS
include ::openstack_integration include openstack_integration
include ::openstack_integration::repos include openstack_integration::repos
include ::openstack_integration::rabbitmq include openstack_integration::rabbitmq
include ::openstack_integration::mysql include openstack_integration::mysql
include ::openstack_integration::keystone include openstack_integration::keystone
exec { 'setenforce 0': exec { 'setenforce 0':
path => '/bin:/sbin:/usr/bin:/usr/sbin', path => '/bin:/sbin:/usr/bin:/usr/sbin',
@ -20,21 +20,21 @@ describe 'basic swift' do
package { 'curl': ensure => present } package { 'curl': ensure => present }
class { '::memcached': class { 'memcached':
listen_ip => '127.0.0.1', listen_ip => '127.0.0.1',
} }
# Swift resources # Swift resources
class { '::swift': class { 'swift':
# not sure how I want to deal with this shared secret # not sure how I want to deal with this shared secret
swift_hash_path_suffix => 'secrete', swift_hash_path_suffix => 'secrete',
package_ensure => latest, package_ensure => latest,
} }
class { '::swift::keystone::auth': class { 'swift::keystone::auth':
password => 'a_big_secret', password => 'a_big_secret',
} }
# === Configure Storage # === Configure Storage
class { '::swift::storage': class { 'swift::storage':
storage_local_net_ip => '127.0.0.1', storage_local_net_ip => '127.0.0.1',
} }
# create xfs partitions on a loopback device and mounts them # create xfs partitions on a loopback device and mounts them
@ -84,7 +84,7 @@ describe 'basic swift' do
weight => 1, weight => 1,
require => Swift::Storage::Loopback['4'] , require => Swift::Storage::Loopback['4'] ,
} }
class { '::swift::ringbuilder': class { 'swift::ringbuilder':
part_power => '18', part_power => '18',
replicas => '1', replicas => '1',
min_part_hours => 1, min_part_hours => 1,
@ -94,15 +94,15 @@ describe 'basic swift' do
replicas => '3', replicas => '3',
min_part_hours => 1, min_part_hours => 1,
} }
class { '::swift::proxy': class { 'swift::proxy':
proxy_local_net_ip => '127.0.0.1', proxy_local_net_ip => '127.0.0.1',
pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'], pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'],
account_autocreate => true, account_autocreate => true,
} }
class { '::swift::proxy::authtoken': class { 'swift::proxy::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
} }
class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': } class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
class {'::swift::objectexpirer': class {'::swift::objectexpirer':
interval => 600, interval => 600,
} }
@ -129,11 +129,11 @@ describe 'basic swift' do
it 'should work with no errors' do it 'should work with no errors' do
swiftinit_pp= <<-EOS swiftinit_pp= <<-EOS
include ::openstack_integration include openstack_integration
include ::openstack_integration::repos include openstack_integration::repos
include ::openstack_integration::rabbitmq include openstack_integration::rabbitmq
include ::openstack_integration::mysql include openstack_integration::mysql
include ::openstack_integration::keystone include openstack_integration::keystone
exec { 'setenforce 0': exec { 'setenforce 0':
path => '/bin:/sbin:/usr/bin:/usr/sbin', path => '/bin:/sbin:/usr/bin:/usr/sbin',
@ -143,21 +143,21 @@ describe 'basic swift' do
package { 'curl': ensure => present } package { 'curl': ensure => present }
class { '::memcached': class { 'memcached':
listen_ip => '127.0.0.1', listen_ip => '127.0.0.1',
} }
# Swift resources # Swift resources
class { '::swift': class { 'swift':
# not sure how I want to deal with this shared secret # not sure how I want to deal with this shared secret
swift_hash_path_suffix => 'secrete', swift_hash_path_suffix => 'secrete',
package_ensure => latest, package_ensure => latest,
} }
class { '::swift::keystone::auth': class { 'swift::keystone::auth':
password => 'a_big_secret', password => 'a_big_secret',
} }
# === Configure Storage # === Configure Storage
class { '::swift::storage': class { 'swift::storage':
storage_local_net_ip => '127.0.0.1', storage_local_net_ip => '127.0.0.1',
} }
# create xfs partitions on a loopback device and mounts them # create xfs partitions on a loopback device and mounts them
@ -207,16 +207,16 @@ describe 'basic swift' do
weight => 1, weight => 1,
require => Swift::Storage::Loopback['4'] , require => Swift::Storage::Loopback['4'] ,
} }
class { '::swift::storage::account': class { 'swift::storage::account':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::container': class { 'swift::storage::container':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::object': class { 'swift::storage::object':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::ringbuilder': class { 'swift::ringbuilder':
part_power => '18', part_power => '18',
replicas => '1', replicas => '1',
min_part_hours => 1, min_part_hours => 1,
@ -226,16 +226,16 @@ describe 'basic swift' do
replicas => '3', replicas => '3',
min_part_hours => 1, min_part_hours => 1,
} }
class { '::swift::proxy': class { 'swift::proxy':
proxy_local_net_ip => '127.0.0.1', proxy_local_net_ip => '127.0.0.1',
pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'], pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'],
account_autocreate => true, account_autocreate => true,
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::proxy::authtoken': class { 'swift::proxy::authtoken':
admin_password => 'a_big_secret', admin_password => 'a_big_secret',
} }
class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': } class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
class {'::swift::objectexpirer': class {'::swift::objectexpirer':
interval => 600, interval => 600,
service_provider => 'swiftinit', service_provider => 'swiftinit',

View File

@ -10,9 +10,9 @@ describe 'swift::proxy' do
let :pre_condition do let :pre_condition do
"class { memcached: max_memory => 1} "class { memcached: max_memory => 1}
class { swift: swift_hash_path_suffix => string } class { swift: swift_hash_path_suffix => string }
include ::swift::proxy::healthcheck include swift::proxy::healthcheck
include ::swift::proxy::cache include swift::proxy::cache
include ::swift::proxy::tempauth" include swift::proxy::tempauth"
end end
describe 'without the proxy local network ip address being specified' do 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 { memcached: max_memory => 1}
class { swift: swift_hash_path_suffix => string } class { swift: swift_hash_path_suffix => string }
swift_proxy_config { 'foo/bar': value => 'foo' } swift_proxy_config { 'foo/bar': value => 'foo' }
include ::swift::proxy::healthcheck include swift::proxy::healthcheck
include ::swift::proxy::cache include swift::proxy::cache
include ::swift::proxy::tempauth include swift::proxy::tempauth
" "
end end
@ -95,7 +95,7 @@ describe 'swift::proxy' do
let :pre_condition do let :pre_condition do
"class { memcached: max_memory => 1} "class { memcached: max_memory => 1}
class { swift: swift_hash_path_suffix => string } class { swift: swift_hash_path_suffix => string }
include ::swift::proxy::swauth" include swift::proxy::swauth"
end end
let :params do let :params do
@ -201,7 +201,7 @@ describe 'swift::proxy' do
let :pre_condition do let :pre_condition do
"class { memcached: max_memory => 1} "class { memcached: max_memory => 1}
class { swift: swift_hash_path_suffix => string } class { swift: swift_hash_path_suffix => string }
include ::swift::proxy::swauth" include swift::proxy::swauth"
end end
it { should contain_swift_proxy_config('DEFAULT/bind_port').with_value('80') } it { should contain_swift_proxy_config('DEFAULT/bind_port').with_value('80') }
@ -267,9 +267,9 @@ describe 'swift::proxy' do
let :pre_condition do let :pre_condition do
"class { memcached: max_memory => 1} "class { memcached: max_memory => 1}
class { swift: swift_hash_path_suffix => string } class { swift: swift_hash_path_suffix => string }
include ::swift::proxy::healthcheck include swift::proxy::healthcheck
include ::swift::proxy::cache include swift::proxy::cache
include ::swift::proxy::tempauth" include swift::proxy::tempauth"
end end