Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
) {
Expand All @@ -66,6 +72,18 @@
$_stripe = ''
}

$_disperse = if $disperse {
"disperse ${disperse}"
} else {
''
}

$_redundancy = if $redundancy {
"redundancy ${redundancy}"
} else {
''
}

$_replica = if $replica {
"replica ${replica}"
} else {
Expand All @@ -90,6 +108,8 @@

$cmd_args = [
$_stripe,
$_disperse,
$_redundancy,
$_replica,
$_arbiter,
$_transport,
Expand Down