Class: Chef::Provider::ChefContainer

Inherits:
Cheffish::ChefProviderBase
  • Object
show all
Defined in:
lib/chef/provider/chef_container.rb

Instance Method Summary collapse

Instance Method Details

#data_handlerObject



43
44
45
# File 'lib/chef/provider/chef_container.rb', line 43

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

#keysObject



47
48
49
# File 'lib/chef/provider/chef_container.rb', line 47

def keys
  { 'containername' => :name, 'containerpath' => :name }
end

#load_current_resourceObject



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/chef/provider/chef_container.rb', line 27

def load_current_resource
  begin
    @current_exists = rest.get("containers/#{new_resource.name}")
  rescue Net::HTTPServerException => e
    if e.response.code == "404"
      @current_exists = false
    else
      raise
    end
  end
end

#new_jsonObject



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

def new_json
  {}
end

#whyrun_supported?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/chef/provider/chef_container.rb', line 7

def whyrun_supported?
  true
end