From ea15eda068fa213b1b2c946e213109cbb7c250b3 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 11 Mar 2014 18:53:01 -0400 Subject: Fix small bugs with chaining. --- lib/puppet/parser/functions/brick_layout_chained.rb | 6 +++--- lib/puppet/parser/functions/brick_layout_simple.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/puppet') 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 -- cgit