X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fvalidate_ipv6_address.rb;h=b1f33fedc339eb0cc2f2743e03b4d749d09468b7;hp=88c133cd23c9d6c8e687189fdbe914ccf9df438a;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb index 88c133cd2..b1f33fedc 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb @@ -3,20 +3,25 @@ # module Puppet::Parser::Functions newfunction(:validate_ipv6_address, :doc => <<-DOC - Validate that all values passed are valid IPv6 addresses. - Fail compilation if any value fails this check. + @summary + Validate that all values passed are valid IPv6 addresses. + Fail compilation if any value fails this check. - The following values will pass: + @return + passes when the given values are valid IPv6 addresses or raise an error when they are not and fails compilation - $my_ip = "3ffe:505:2" - validate_ipv6_address(1) - validate_ipv6_address($my_ip) - validate_bool("fe80::baf6:b1ff:fe19:7507", $my_ip) + @example **Usage** + The following values will pass: - The following values will fail, causing compilation to abort: + $my_ip = "3ffe:505:2" + validate_ipv6_address(1) + validate_ipv6_address($my_ip) + validate_bool("fe80::baf6:b1ff:fe19:7507", $my_ip) - $some_array = [ true, false, "garbage string", "1.2.3.4" ] - validate_ipv6_address($some_array) + The following values will fail, causing compilation to abort: + + $some_array = [ true, false, "garbage string", "1.2.3.4" ] + validate_ipv6_address($some_array) DOC ) do |args|