lib/puppet/type/macgroup.rb
# Validate a Group's GeneratedUUID in OpenDirectory
# - given a valid uuid, find the corresponding record
# - generates a warning if the uuid cannot be resovled
# - always returns the GeneratedUID (input)
Validate a Group's GeneratedUUID in OpenDirectory
given a valid uuid, find the corresponding record
generates a warning if the uuid cannot be resovled
always returns the GeneratedUID (input)
Validate a Group ' s GeneratedUUID in OpenDirectory given a valid uuid find the corresponding record generates a warning if the uuid cannot be resovled always returns the GeneratedUID ( input )
def uuid_to_group(uuid)
      result = ::ManagedMacCommon::dscl_find_by(:groups, 'GeneratedUID', uuid)
      unless result.respond_to? :first
        raise Puppet::Error,
           "An unknown error occurred while searching: #{result}"
      end
      if result.empty?
        Puppet::Util::Warnings.warnonce(
          "Macgroup: Group not found: \'#{uuid}\'")
      end
      uuid
    end
def uuid_to_group ( uuid ) result = :: ManagedMacCommon :: dscl_find_by ( :groups , 'GeneratedUID' , uuid ) unless result . respond_to? :first raise Puppet :: Error , "An unknown error occurred while searching: #{result}" end if result . empty? Puppet :: Util :: Warnings . warnonce ( "Macgroup: Group not found: \'#{uuid}\'" ) end uuid end
Validate a Group's GeneratedUUID in OpenDirectory
 given a valid uuid, find the corresponding record
 generates a warning if the uuid cannot be resovled
 always returns the GeneratedUID (input)
Validate a Group ' s GeneratedUUID in OpenDirectory given a valid uuid find the corresponding record generates a warning if the uuid cannot be resovled always returns the GeneratedUID ( input )
uuid