Skip to content

Commit

Permalink
Validate for required parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rodjek committed May 16, 2010
1 parent 5b75cba commit 8df9431
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/puppet/type/ha_crm_primitive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@

isnamevar
end

validate do
raise Puppet::Error, "You must specify a class for this primitive" unless @parameters.include?(:class)
raise Puppet::Error, "You must specify a type for this primitive" unless @parameters.include?(:type)
end
end

0 comments on commit 8df9431

Please sign in to comment.