comparison modules/stdlib/lib/puppet/functions/deprecation.rb @ 275:d9352a684e62

Mass update of modules to remove deprecation warnings
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Jan 2020 11:36:07 +0000
parents c42fb28cff86
children adf6fe9bbc17
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
1 # Function to print deprecation warnings, Logs a warning once for a given key. The uniqueness key - can appear once. 1 # Function to print deprecation warnings, Logs a warning once for a given key.
2 # The msg is the message text including any positional information that is formatted by the user/caller of the method.
3 # It is affected by the puppet setting 'strict', which can be set to :error (outputs as an error message),
4 # :off (no message / error is displayed) and :warning (default, outputs a warning) *Type*: String, String.
5 # 2 #
6 3 # The uniqueness key - can appear once.
4 # The msg is the message text including any positional information that is formatted by the
5 # user/caller of the method.
6 # It is affected by the puppet setting 'strict', which can be set to :error
7 # (outputs as an error message), :off (no message / error is displayed) and :warning
8 # (default, outputs a warning) *Type*: String, String.
9 #
7 Puppet::Functions.create_function(:deprecation) do 10 Puppet::Functions.create_function(:deprecation) do
11 # @param key
12 # @param message
13 # @return deprecated warnings
8 dispatch :deprecation do 14 dispatch :deprecation do
9 param 'String', :key 15 param 'String', :key
10 param 'String', :message 16 param 'String', :message
11 end 17 end
12 18