summaryrefslogtreecommitdiff
path: root/lib/puppet/functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/functions')
-rw-r--r--lib/puppet/functions/validate_absolute_path.rb13
-rw-r--r--lib/puppet/functions/validate_array.rb13
-rw-r--r--lib/puppet/functions/validate_bool.rb13
-rw-r--r--lib/puppet/functions/validate_hash.rb13
-rw-r--r--lib/puppet/functions/validate_integer.rb13
-rw-r--r--lib/puppet/functions/validate_ip_address.rb13
-rw-r--r--lib/puppet/functions/validate_ipv4_address.rb13
-rw-r--r--lib/puppet/functions/validate_ipv6_address.rb13
-rw-r--r--lib/puppet/functions/validate_numeric.rb13
-rw-r--r--lib/puppet/functions/validate_re.rb13
-rw-r--r--lib/puppet/functions/validate_string.rb13
11 files changed, 110 insertions, 33 deletions
diff --git a/lib/puppet/functions/validate_absolute_path.rb b/lib/puppet/functions/validate_absolute_path.rb
index 5ae9d29..94f52e1 100644
--- a/lib/puppet/functions/validate_absolute_path.rb
+++ b/lib/puppet/functions/validate_absolute_path.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_absolute_path", "Stdlib::Compat::Absolute_Path")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_absolute_path, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_Path. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_absolute_path", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_array.rb b/lib/puppet/functions/validate_array.rb
index 9155784..eb8f5e5 100644
--- a/lib/puppet/functions/validate_array.rb
+++ b/lib/puppet/functions/validate_array.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_array", "Stdlib::Compat::Array")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_array, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_array", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_bool.rb b/lib/puppet/functions/validate_bool.rb
index 10f6edf..168775d 100644
--- a/lib/puppet/functions/validate_bool.rb
+++ b/lib/puppet/functions/validate_bool.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_bool", "Stdlib::Compat::Bool")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_bool, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_bool", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_hash.rb b/lib/puppet/functions/validate_hash.rb
index 5349664..c356ceb 100644
--- a/lib/puppet/functions/validate_hash.rb
+++ b/lib/puppet/functions/validate_hash.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_hash", "Stdlib::Compat::Hash")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_hash, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Hash. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_hash", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_integer.rb b/lib/puppet/functions/validate_integer.rb
index 2c4645d..db95f1c 100644
--- a/lib/puppet/functions/validate_integer.rb
+++ b/lib/puppet/functions/validate_integer.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_integer", "Stdlib::Compat::Integer")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_integer, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Integer. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_integer", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_ip_address.rb b/lib/puppet/functions/validate_ip_address.rb
index 15a710e..eaf56bb 100644
--- a/lib/puppet/functions/validate_ip_address.rb
+++ b/lib/puppet/functions/validate_ip_address.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_ip_address", "Stdlib::Compat::Ip_Address")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_ip_address, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ip_Address. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_ip_address", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_ipv4_address.rb b/lib/puppet/functions/validate_ipv4_address.rb
index 8e1bc59..6a870eb 100644
--- a/lib/puppet/functions/validate_ipv4_address.rb
+++ b/lib/puppet/functions/validate_ipv4_address.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_ipv4_address", "Stdlib::Compat::Ipv4_Address")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_ipv4_address, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv4_Address. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_ipv4_address", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_ipv6_address.rb b/lib/puppet/functions/validate_ipv6_address.rb
index 865648a..922a9ac 100644
--- a/lib/puppet/functions/validate_ipv6_address.rb
+++ b/lib/puppet/functions/validate_ipv6_address.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_ipv6_address", "Stdlib::Compat::Ipv6_address")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_ipv6_address, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv6_address. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_ipv6_address", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_numeric.rb b/lib/puppet/functions/validate_numeric.rb
index 0c2e1f2..e48bec4 100644
--- a/lib/puppet/functions/validate_numeric.rb
+++ b/lib/puppet/functions/validate_numeric.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_numeric", "Stdlib::Compat::Numeric")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_numeric, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Numeric. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_numeric", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_re.rb b/lib/puppet/functions/validate_re.rb
index d63ed42..8a95077 100644
--- a/lib/puppet/functions/validate_re.rb
+++ b/lib/puppet/functions/validate_re.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_re", "Stdlib::Compat::Re")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_re, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Pattern[]. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_re", args)
+ end
+end
diff --git a/lib/puppet/functions/validate_string.rb b/lib/puppet/functions/validate_string.rb
index a196f43..fe4c623 100644
--- a/lib/puppet/functions/validate_string.rb
+++ b/lib/puppet/functions/validate_string.rb
@@ -1,3 +1,10 @@
-require 'puppet_x/puppetlabs/stdlib/deprecation_gen'
-PuppetX::Puppetlabs::Stdlib.deprecation_gen("validate_string", "Stdlib::Compat::String")
-# Puppet::Functions.create_function
+Puppet::Functions.create_function(:validate_string, Puppet::Functions::InternalFunction) do
+ dispatch :deprecation_gen do
+ scope_param
+ optional_repeated_param 'Any', :args
+ end
+ def deprecation_gen(scope, *args)
+ call_function('deprecation', 'puppet_3_type_check', "This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.")
+ scope.send("function_validate_string", args)
+ end
+end