class Chef::Resource::ChefGroup
Public Instance Methods
augment_new_json(json)
click to toggle source
# File lib/chef/resource/chef_group.rb, line 56 def augment_new_json(json) # Apply modifiers json["users"] |= new_resource.users json["clients"] |= new_resource.clients json["groups"] |= new_resource.groups json["users"] -= new_resource.remove_users json["clients"] -= new_resource.remove_clients json["groups"] -= new_resource.remove_groups json end
data_handler()
click to toggle source
# File lib/chef/resource/chef_group.rb, line 75 def data_handler Chef::ChefFS::DataHandler::GroupDataHandler.new end
keys()
click to toggle source
# File lib/chef/resource/chef_group.rb, line 79 def keys { "name" => :group_name, "groupname" => :group_name, } end
load_current_resource()
click to toggle source
# File lib/chef/resource/chef_group.rb, line 46 def load_current_resource @current_resource = json_to_resource(rest.get("groups/#{new_resource.group_name}")) rescue Net::HTTPClientException => e if e.response.code == "404" @current_resource = not_found_resource else raise end end
resource_class()
click to toggle source
Helpers
# File lib/chef/resource/chef_group.rb, line 71 def resource_class Chef::Resource::ChefGroup end