aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/manifests/ringbuilder.pp
diff options
context:
space:
mode:
authorGael Chamoulaud <gchamoul@redhat.com>2015-09-21 15:14:27 +0200
committerGael Chamoulaud <gchamoul@redhat.com>2015-11-05 15:52:28 +0100
commitb9aab0951835be1acee0e116b0d679c9af1489f4 (patch)
treea4d98258d8d3ef0ee2b87a9805453a2f4b316f4f /puppet/manifests/ringbuilder.pp
parent0d6b04c21a8308701416c15c1594d6253d848753 (diff)
Make puppet manifests compliant with Puppet 4.x
- https://docs.puppetlabs.com/puppet/3.8/reference/deprecated_language.html - Temporary disablement of the pupppet-lint autoload layout check failing for ringbuilder.pp. A fix for that will be part of an other patch. Change-Id: I495825641ab12e7c5789c1405649c356c5bb8051 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
Diffstat (limited to 'puppet/manifests/ringbuilder.pp')
-rw-r--r--puppet/manifests/ringbuilder.pp22
1 files changed, 12 insertions, 10 deletions
diff --git a/puppet/manifests/ringbuilder.pp b/puppet/manifests/ringbuilder.pp
index 1897dcd0..4296208b 100644
--- a/puppet/manifests/ringbuilder.pp
+++ b/puppet/manifests/ringbuilder.pp
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-include tripleo::packages
+include ::tripleo::packages
define add_devices(
$swift_zones = '1'
@@ -37,31 +37,33 @@ define add_devices(
$base = regsubst($name,'^r1.*-(.*)$','\1')
$object = regsubst($base, '%PORT%', '6000')
ring_object_device { $object:
- zone => '1',
- weight => 100,
+ zone => '1',
+ weight => 100,
}
$container = regsubst($base, '%PORT%', '6001')
ring_container_device { $container:
- zone => '1',
- weight => 100,
+ zone => '1',
+ weight => 100,
}
$account = regsubst($base, '%PORT%', '6002')
ring_account_device { $account:
- zone => '1',
- weight => 100,
+ zone => '1',
+ weight => 100,
}
}
class tripleo::ringbuilder (
$swift_zones = '1',
$devices = '',
- $build_ring = 'True',
+ $build_ring = true,
$part_power,
$replicas,
$min_part_hours,
) {
- if str2bool(downcase("$build_ring")) {
+ validate_bool($build_ring)
+
+ if $build_ring {
$device_array = strip(split(rstrip($devices), ','))
@@ -74,7 +76,7 @@ class tripleo::ringbuilder (
# add all other devices
add_devices {$device_array:
- swift_zones => $swift_zones
+ swift_zones => $swift_zones,
} ->
# rebalance