# class Chef::ChefFS::DataHandler::ClientDataHandler

### Public Instance Methods

chef_class() click to toggle source

    # File lib/chef/chef_fs/data_handler/client_data_handler.rb, line 29
    def chef_class
      Chef::ApiClient
    end

normalize(client, entry) click to toggle source

    # File lib/chef/chef_fs/data_handler/client_data_handler.rb, line 8
    def normalize(client, entry)
      defaults = {
        'name' => remove_dot_json(entry.name),
        'clientname' => remove_dot_json(entry.name),
        'admin' => false,
        'validator' => false,
        'chef_type' => 'client'
      }
      if entry.respond_to?(:org) && entry.org
        defaults['orgname'] = entry.org
      end
      result = normalize_hash(client, defaults)
      # You can NOT send json_class, or it will fail
      result.delete('json_class')
      result
    end

preserve_key(key) click to toggle source

    # File lib/chef/chef_fs/data_handler/client_data_handler.rb, line 25
    def preserve_key(key)
      return key == 'name'
    end