Skip to content

Commit f164be1

Browse files
committed
feat: add capability to create disperse volumes
1 parent 62efb20 commit f164be1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

manifests/volume.pp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#
33
# @param stripe
44
# the stripe count to use for a striped volume
5+
# @param disperse
6+
# the brick count to use for a disperse volume
7+
# @param redundancy
8+
# the failure tolerance to use for a disperse volume
59
# @param replica
610
# the replica count to use for a replica volume
711
# @param arbiter
@@ -50,6 +54,8 @@
5054
Boolean $remove_options = false,
5155
Optional[Array] $options = undef,
5256
Optional[Integer] $stripe = undef,
57+
Optional[Integer] $disperse = undef,
58+
Optional[Integer] $redundancy = undef,
5359
Optional[Integer] $replica = undef,
5460
Optional[Integer] $arbiter = undef,
5561
) {
@@ -66,6 +72,18 @@
6672
$_stripe = ''
6773
}
6874

75+
$_disperse = if $disperse {
76+
"disperse ${disperse}"
77+
} else {
78+
''
79+
}
80+
81+
$_redundancy = if $redundancy {
82+
"redundancy ${redundancy}"
83+
} else {
84+
''
85+
}
86+
6987
$_replica = if $replica {
7088
"replica ${replica}"
7189
} else {
@@ -90,6 +108,8 @@
90108

91109
$cmd_args = [
92110
$_stripe,
111+
$_disperse,
112+
$_redundancy,
93113
$_replica,
94114
$_arbiter,
95115
$_transport,

0 commit comments

Comments
 (0)