Revert: refactoring inheritance variables

(b726a10ca3)
This commit is contained in:
vic 2012-12-15 17:20:41 +04:00
parent b3b253a3b1
commit c6e0739a53
4 changed files with 9 additions and 21 deletions

View File

@ -1,15 +1,12 @@
class swift::storage::account(
$swift_zone,
$port,
$storage_local_net_ip,
$package_ensure = 'present',
$package_ensure = 'present'
) {
swift::storage::generic { 'account':
package_ensure => $package_ensure,
}
@@ring_account_device { "${storage_local_net_ip}:${port}":
zone => $swift_zone,
@@ring_account_device { "${swift::storage::all::storage_local_net_ip}:${swift::storage::all::account_port}":
zone => $swift::storage::all::swift_zone,
mountpoints => $::swift_mountpoints,
}
}

View File

@ -1,15 +1,12 @@
class swift::storage::container(
$swift_zone,
$port,
$storage_local_net_ip,
$package_ensure = 'present'
) {
swift::storage::generic { 'container':
package_ensure => $package_ensure
}
@@ring_container_device { "${storage_local_net_ip}:${port}":
zone => $swift_zone,
@@ring_container_device { "${swift::storage::all::storage_local_net_ip}:${swift::storage::all::container_port}":
zone => $swift::storage::all::swift_zone,
mountpoints => $::swift_mountpoints,
}

View File

@ -1,15 +1,12 @@
class swift::storage::object(
$swift_zone,
$port,
$storage_local_net_ip,
$package_ensure = 'present'
) {
swift::storage::generic { 'object':
package_ensure => $package_ensure
}
@@ring_object_device { "${storage_local_net_ip}:${port}":
zone => $swift_zone,
@@ring_object_device { "${swift::storage::all::storage_local_net_ip}:${swift::storage::all::object_port}":
zone => $swift::storage::all::swift_zone,
mountpoints => $::swift_mountpoints,
}
}

View File

@ -6,6 +6,7 @@
define swift::storage::server(
$type,
$swift_zone,
$port = $name,
$storage_local_net_ip,
$devices = '/srv/node',
$owner = 'swift',
@ -31,11 +32,7 @@ define swift::storage::server(
warning("swift storage server ${type} must specify ${type}-server")
}
class { "swift::storage::${type}":
storage_local_net_ip => $storage_local_net_ip,
swift_zone => $swift_zone,
port => $name,
}
include "swift::storage::$type"
include 'concat::setup'
validate_re($name, '^\d+$')