summaryrefslogtreecommitdiff
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorKen Barber <ken@bob.sh>2011-08-05 08:25:03 +0100
committerKen Barber <ken@bob.sh>2011-08-05 08:25:03 +0100
commit681a1c7971d78c53dc9a0747ae4d983ff6b0d670 (patch)
tree3d56e35ffd165eb6d15bd54a06c41f8aa706fa1c /lib/puppet/parser
parent35fefe186546427963d8c8a446fa98875d65ccad (diff)
Prep for stdlib merge
* Renamed load_yaml & load_json to parseyaml & parsejson * Renamed is_valid_* functions and remove the 'valid_'
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/functions/is_domain_name.rb (renamed from lib/puppet/parser/functions/is_valid_domain_name.rb)6
-rw-r--r--lib/puppet/parser/functions/is_ip_address.rb (renamed from lib/puppet/parser/functions/is_valid_ip_address.rb)6
-rw-r--r--lib/puppet/parser/functions/is_mac_address.rb (renamed from lib/puppet/parser/functions/is_valid_mac_address.rb)6
-rw-r--r--lib/puppet/parser/functions/parsejson.rb (renamed from lib/puppet/parser/functions/load_json.rb)6
-rw-r--r--lib/puppet/parser/functions/parseyaml.rb (renamed from lib/puppet/parser/functions/load_yaml.rb)6
5 files changed, 15 insertions, 15 deletions
diff --git a/lib/puppet/parser/functions/is_valid_domain_name.rb b/lib/puppet/parser/functions/is_domain_name.rb
index 7dd9c0b..4e92939 100644
--- a/lib/puppet/parser/functions/is_valid_domain_name.rb
+++ b/lib/puppet/parser/functions/is_domain_name.rb
@@ -1,15 +1,15 @@
#
-# is_valid_domain_name.rb
+# is_domain_name.rb
#
module Puppet::Parser::Functions
- newfunction(:is_valid_domain_name, :type => :rvalue, :doc => <<-EOS
+ newfunction(:is_domain_name, :type => :rvalue, :doc => <<-EOS
Returns true if the string passed to this function is a valid IP address. Support for IPv4 and IPv6 address types is included.
EOS
) do |arguments|
if (arguments.size != 1) then
- raise(Puppet::ParseError, "is_valid_domain_name(): Wrong number of arguments "+
+ raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end
diff --git a/lib/puppet/parser/functions/is_valid_ip_address.rb b/lib/puppet/parser/functions/is_ip_address.rb
index 604d938..b4a9a15 100644
--- a/lib/puppet/parser/functions/is_valid_ip_address.rb
+++ b/lib/puppet/parser/functions/is_ip_address.rb
@@ -1,9 +1,9 @@
#
-# is_valid_ip_address.rb
+# is_ip_address.rb
#
module Puppet::Parser::Functions
- newfunction(:is_valid_ip_address, :type => :rvalue, :doc => <<-EOS
+ newfunction(:is_ip_address, :type => :rvalue, :doc => <<-EOS
Returns true if the string passed to this function is a valid IP address.
EOS
) do |arguments|
@@ -11,7 +11,7 @@ Returns true if the string passed to this function is a valid IP address.
require 'ipaddr'
if (arguments.size != 1) then
- raise(Puppet::ParseError, "is_valid_ip_address(): Wrong number of arguments "+
+ raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end
diff --git a/lib/puppet/parser/functions/is_valid_mac_address.rb b/lib/puppet/parser/functions/is_mac_address.rb
index 53199b6..1b3088a 100644
--- a/lib/puppet/parser/functions/is_valid_mac_address.rb
+++ b/lib/puppet/parser/functions/is_mac_address.rb
@@ -1,15 +1,15 @@
#
-# is_valid_mac_address.rb
+# is_mac_address.rb
#
module Puppet::Parser::Functions
- newfunction(:is_valid_mac_address, :type => :rvalue, :doc => <<-EOS
+ newfunction(:is_mac_address, :type => :rvalue, :doc => <<-EOS
Returns true if the string passed to this function is a valid mac address.
EOS
) do |arguments|
if (arguments.size != 1) then
- raise(Puppet::ParseError, "is_valid_mac_address(): Wrong number of arguments "+
+ raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end
diff --git a/lib/puppet/parser/functions/load_json.rb b/lib/puppet/parser/functions/parsejson.rb
index 333cf11..cf3b12c 100644
--- a/lib/puppet/parser/functions/load_json.rb
+++ b/lib/puppet/parser/functions/parsejson.rb
@@ -1,16 +1,16 @@
#
-# load_json.rb
+# parsejson.rb
#
module Puppet::Parser::Functions
- newfunction(:load_json, :type => :rvalue, :doc => <<-EOS
+ newfunction(:parsejson, :type => :rvalue, :doc => <<-EOS
This function accepts JSON as a string and converts into the correct Puppet
structure.
EOS
) do |arguments|
if (arguments.size != 1) then
- raise(Puppet::ParseError, "load_json(): Wrong number of arguments "+
+ raise(Puppet::ParseError, "parsejson(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end
diff --git a/lib/puppet/parser/functions/load_yaml.rb b/lib/puppet/parser/functions/parseyaml.rb
index 2683277..e8ac8a4 100644
--- a/lib/puppet/parser/functions/load_yaml.rb
+++ b/lib/puppet/parser/functions/parseyaml.rb
@@ -1,16 +1,16 @@
#
-# load_yaml.rb
+# parseyaml.rb
#
module Puppet::Parser::Functions
- newfunction(:load_yaml, :type => :rvalue, :doc => <<-EOS
+ newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS
This function accepts YAML as a string and converts it into the correct
Puppet structure.
EOS
) do |arguments|
if (arguments.size != 1) then
- raise(Puppet::ParseError, "load_yaml(): Wrong number of arguments "+
+ raise(Puppet::ParseError, "parseyaml(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end