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_domain_name.rb;h=f3dc1d5f18cd4e5881bbfc12e527d7cc0305cd6c;hp=c479dfb43c90d06a892a45b927c6dac4ab93618b;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_domain_name.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_domain_name.rb index c479dfb43..f3dc1d5f1 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_domain_name.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_domain_name.rb @@ -3,23 +3,28 @@ # module Puppet::Parser::Functions newfunction(:validate_domain_name, :doc => <<-DOC - Validate that all values passed are syntactically correct domain names. - Fail compilation if any value fails this check. + @summary + Validate that all values passed are syntactically correct domain names. + Fail compilation if any value fails this check. - The following values will pass: + @return + passes when the given values are syntactically correct domain names or raise an error when they are not and fails compilation - $my_domain_name = 'server.domain.tld' - validate_domain_name($my_domain_name) - validate_domain_name('domain.tld', 'puppet.com', $my_domain_name) + @example **Usage** - The following values will fail, causing compilation to abort: + The following values will pass: - validate_domain_name(1) - validate_domain_name(true) - validate_domain_name('invalid domain') - validate_domain_name('-foo.example.com') - validate_domain_name('www.example.2com') + $my_domain_name = 'server.domain.tld' + validate_domain_name($my_domain_name) + validate_domain_name('domain.tld', 'puppet.com', $my_domain_name) + The following values will fail, causing compilation to abort: + + validate_domain_name(1) + validate_domain_name(true) + validate_domain_name('invalid domain') + validate_domain_name('-foo.example.com') + validate_domain_name('www.example.2com') DOC ) do |args|