Class: Chef::Provider::ChefUser

Inherits:
Cheffish::ActorProviderBase show all
Defined in:
lib/chef/provider/chef_user.rb

Instance Method Summary collapse

Methods inherited from Cheffish::ActorProviderBase

#augment_new_json, #create_actor, #delete_actor, #load_current_resource, #new_public_key

Methods inherited from Cheffish::ChefProviderBase

#apply_modifiers, #apply_run_list_modifiers, #augment_current_json, #augment_new_json, #current_json, #current_resource_exists?, #json_differences, #json_differences_internal, #json_to_resource, #new_json, #normalize, #normalize_for_post, #normalize_for_put, #not_found_resource, #resource_to_json, #rest, #same_run_list_item

Instance Method Details

#actor_pathObject



31
32
33
# File 'lib/chef/provider/chef_user.rb', line 31

def actor_path
  "#{rest.root_url}/users"
end

#actor_typeObject

Helpers

Gives us new_json, current_json, not_found_json, etc.



27
28
29
# File 'lib/chef/provider/chef_user.rb', line 27

def actor_type
  'user'
end

#data_handlerObject



39
40
41
# File 'lib/chef/provider/chef_user.rb', line 39

def data_handler
  Chef::ChefFS::DataHandler::UserDataHandler.new
end

#keysObject



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/chef/provider/chef_user.rb', line 43

def keys
  {
    'name' => :name,
    'username' => :name,
    'display_name' => :display_name,
    'admin' => :admin,
    'email' => :email,
    'password' => :password,
    'external_authentication_uid' => :external_authentication_uid,
    'recovery_authentication_enabled' => :recovery_authentication_enabled,
    'public_key' => :source_key
  }
end

#resource_classObject



35
36
37
# File 'lib/chef/provider/chef_user.rb', line 35

def resource_class
  Chef::Resource::ChefUser
end

#whyrun_supported?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/chef/provider/chef_user.rb', line 10

def whyrun_supported?
  true
end