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%2Fhas_interface_with.rb;h=fb9af42eb9ac76898e481447584348c0b70674db;hp=44005d0a0a44cb94ce8555f0f334f4a71eda4bc9;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb index 44005d0a0..fb9af42eb 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb @@ -3,18 +3,20 @@ # module Puppet::Parser::Functions newfunction(:has_interface_with, :type => :rvalue, :doc => <<-DOC - Returns boolean based on kind and value: - * macaddress - * netmask - * ipaddress - * network + @summary + Returns boolean based on kind and value. - has_interface_with("macaddress", "x:x:x:x:x:x") - has_interface_with("ipaddress", "127.0.0.1") => true - etc. + @return + boolean values `true` or `false` - If no "kind" is given, then the presence of the interface is checked: - has_interface_with("lo") => true + Valid kinds are `macaddress`, `netmask`, `ipaddress` and `network`. + + @example **Usage** + has_interface_with("macaddress", "x:x:x:x:x:x") # Returns `false` + has_interface_with("ipaddress", "127.0.0.1") # Returns `true` + + @example If no "kind" is given, then the presence of the interface is checked: + has_interface_with("lo") # Returns `true` DOC ) do |args|