#
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|