aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-10 16:07:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-10 16:07:08 -0300
commit57b0cf9b40879b0a9b8179eb8b9803614403e409 (patch)
treee67c8dcf47d1e1eaf3e85e18676c746330a85e14 /manifests/vserver.pp
parent17b7565784f6fb85b6babecf731ae7abdee82e35 (diff)
downloadpuppet-virtual-57b0cf9b40879b0a9b8179eb8b9803614403e409.tar.gz
puppet-virtual-57b0cf9b40879b0a9b8179eb8b9803614403e409.tar.bz2
Using if's instead of case's at vs_sched
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp56
1 files changed, 16 insertions, 40 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 76632f3..8f704aa 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -440,60 +440,36 @@ define vs_sched($vserver, $ensure = present, $fill_rate = '', $fill_rate2 = '',
case $ensure {
present: {
- case $fill_rate {
- '' => { }
- default => {
- $set_fill_rate = "--fill-rate $fill_rate"
- }
+ if $fill_rate != '' {
+ $set_fill_rate = "--fill-rate $fill_rate"
}
- case $fill_rate2 {
- '' => { }
- default => {
- $set_fill_rate2 = "--fill-rate2 $fill_rate2"
- }
+ if $fill_rate2 != '' {
+ $set_fill_rate2 = "--fill-rate2 $fill_rate2"
}
- case $interval {
- '' => { }
- default => {
- $set_interval = "--interval $interval"
- }
+ if $interval != '' {
+ $set_interval = "--interval $interval"
}
- case $interval2 {
- '' => { }
- default => {
- $set_interval2 = "--interval2 $interval2"
- }
+ if $interval2 != '' {
+ $set_interval2 = "--interval2 $interval2"
}
- case $tokens_min {
- '' => { }
- default => {
- $set_tokens_min = "--tokens-min $tokens_min"
- }
+ if $tokens_min != '' {
+ $set_tokens_min = "--tokens-min $tokens_min"
}
- case $tokens_max {
- '' => { }
- default => {
- $set_tokens_max = "--tokens-max $tokens_max"
- }
+ if $tokens_max != '' {
+ $set_tokens_max = "--tokens-max $tokens_max"
}
- case $tokens {
- '' => { }
- default => {
- $set_tokens = "--tokens $tokens"
- }
+ if $tokens != '' {
+ $set_tokens = "--tokens $tokens"
}
- case $priority_bias {
- '' => { }
- default => {
- $set_priority_bias = "--prio-bias $priority_bias"
- }
+ if $priority_bias != '' {
+ $set_priority_bias = "--prio-bias $priority_bias"
}
case $idle_time {