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( class swift::storage::account(
$swift_zone, $package_ensure = 'present'
$port,
$storage_local_net_ip,
$package_ensure = 'present',
) { ) {
swift::storage::generic { 'account': swift::storage::generic { 'account':
package_ensure => $package_ensure, package_ensure => $package_ensure,
} }
@@ring_account_device { "${storage_local_net_ip}:${port}": @@ring_account_device { "${swift::storage::all::storage_local_net_ip}:${swift::storage::all::account_port}":
zone => $swift_zone, zone => $swift::storage::all::swift_zone,
mountpoints => $::swift_mountpoints, mountpoints => $::swift_mountpoints,
} }
} }

View File

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

View File

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

View File

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