5 module Puppet::Parser::Functions
6 newfunction(:is_mac_address, :type => :rvalue, :doc => <<-EOS
7 Returns true if the string passed to this function is a valid mac address.
11 if (arguments.size != 1) then
12 raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments given #{arguments.size} for 1")
17 if /^[a-f0-9]{1,2}(:[a-f0-9]{1,2}){5}$/i.match(mac) then
26 # vim: set ts=2 sw=2 et :