From 2fa0a489e26fc2512783c67b1b4579a03f8a20a6 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 22 Jan 2010 00:48:37 -0800 Subject: Adding parameter validation to Puppet::Resource This will allow us to remove all of the parameter validation from the other Resource classes. This is possible because resource types defined in the language are visible outside of the parser, via the environment. This will enable lots of code removal and simplication. Signed-off-by: Luke Kanies --- lib/puppet/parser/resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 63d028c0c..428b9df50 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -396,7 +396,7 @@ class Puppet::Parser::Resource # Now make sure it's a valid argument to our class. These checks # are organized in order of commonhood -- most types, it's a valid # argument and paramcheck is enabled. - if @ref.typeclass.validattr?(param) + if @ref.typeclass.valid_parameter?(param) true elsif %w{name title}.include?(param) # always allow these true -- cgit