aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/manifests/ringbuilder.pp
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-09 18:32:30 +0000
committerGerrit Code Review <review@openstack.org>2015-11-09 18:32:30 +0000
commit74c22572c770459802d93b47c17414e4507413e1 (patch)
tree7752f55021e8bb76b1fdc94c1ee8e6d6558d6506 /puppet/manifests/ringbuilder.pp
parentd065123bcfe331c928728ae2800a7504d64deab6 (diff)
parentb9aab0951835be1acee0e116b0d679c9af1489f4 (diff)
Merge "Make puppet manifests compliant with Puppet 4.x"
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