diff options
author | James Shubin <james@shubin.ca> | 2014-03-11 18:53:01 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2014-03-16 22:39:07 -0400 |
commit | ea15eda068fa213b1b2c946e213109cbb7c250b3 (patch) | |
tree | b600b8a99d6d28856d88abb02bb8a5e543334d8c /lib/puppet | |
parent | 595e33ca69c0224f233b461b4d55cb42c38695f9 (diff) | |
download | puppet-gluster-ea15eda068fa213b1b2c946e213109cbb7c250b3.tar.gz puppet-gluster-ea15eda068fa213b1b2c946e213109cbb7c250b3.tar.xz puppet-gluster-ea15eda068fa213b1b2c946e213109cbb7c250b3.zip |
Fix small bugs with chaining.
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/parser/functions/brick_layout_chained.rb | 6 | ||||
-rw-r--r-- | lib/puppet/parser/functions/brick_layout_simple.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/functions/brick_layout_chained.rb b/lib/puppet/parser/functions/brick_layout_chained.rb index 072fba9..472e167 100644 --- a/lib/puppet/parser/functions/brick_layout_chained.rb +++ b/lib/puppet/parser/functions/brick_layout_chained.rb @@ -28,7 +28,8 @@ module Puppet::Parser::Functions ENDHEREDOC - # signature: node, zone -> ip + Puppet::Parser::Functions.function('warning') # load function + # signature: replica, bricks -> bricks unless args.length == 2 raise Puppet::ParseError, "brick_layout_chained(): wrong number of arguments (#{args.length}; must be 2)" end @@ -119,8 +120,7 @@ module Puppet::Parser::Functions path = brickstack[host].shift # yoink if path.nil? - # TODO: is raise okay? - raise Puppet::ParseError, "brick_layout_chained(): brick list is not valid" + function_warning(["brick_layout_chained(): brick list is not valid"]) next end final.append({'host' => host, 'path' => path}) # save diff --git a/lib/puppet/parser/functions/brick_layout_simple.rb b/lib/puppet/parser/functions/brick_layout_simple.rb index 96ef70d..aefc1e2 100644 --- a/lib/puppet/parser/functions/brick_layout_simple.rb +++ b/lib/puppet/parser/functions/brick_layout_simple.rb @@ -34,7 +34,7 @@ module Puppet::Parser::Functions ENDHEREDOC - # signature: node, zone -> ip + # signature: replica, bricks -> bricks unless args.length == 2 raise Puppet::ParseError, "brick_layout_simple(): wrong number of arguments (#{args.length}; must be 2)" end |