From 5166f9dac02f95fb03fddd926fd3184ad67313a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20B=C3=BCsing?= Date: Tue, 28 Apr 2020 10:59:48 +0200 Subject: [PATCH] feat: add capability to create disperse volumes --- manifests/volume.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/manifests/volume.pp b/manifests/volume.pp index 4e3d85da..0a1df987 100644 --- a/manifests/volume.pp +++ b/manifests/volume.pp @@ -2,6 +2,10 @@ # # @param stripe # the stripe count to use for a striped volume +# @param disperse +# the brick count to use for a disperse volume +# @param redundancy +# the failure tolerance to use for a disperse volume # @param replica # the replica count to use for a replica volume # @param arbiter @@ -50,6 +54,8 @@ Boolean $remove_options = false, Optional[Array] $options = undef, Optional[Integer] $stripe = undef, + Optional[Integer] $disperse = undef, + Optional[Integer] $redundancy = undef, Optional[Integer] $replica = undef, Optional[Integer] $arbiter = undef, ) { @@ -66,6 +72,18 @@ $_stripe = '' } + $_disperse = if $disperse { + "disperse ${disperse}" + } else { + '' + } + + $_redundancy = if $redundancy { + "redundancy ${redundancy}" + } else { + '' + } + $_replica = if $replica { "replica ${replica}" } else { @@ -90,6 +108,8 @@ $cmd_args = [ $_stripe, + $_disperse, + $_redundancy, $_replica, $_arbiter, $_transport,