Class: Chef::Provider::ChefContainer
- Inherits:
-
Cheffish::ChefProviderBase
- Object
- Cheffish::ChefProviderBase
- Chef::Provider::ChefContainer
- Defined in:
- lib/chef/provider/chef_container.rb
Instance Method Summary collapse
- #data_handler ⇒ Object
- #keys ⇒ Object
- #load_current_resource ⇒ Object
- #new_json ⇒ Object
- #whyrun_supported? ⇒ Boolean
Instance Method Details
#data_handler ⇒ Object
43 44 45 |
# File 'lib/chef/provider/chef_container.rb', line 43 def data_handler Chef::ChefFS::DataHandler::ContainerDataHandler.new end |
#keys ⇒ Object
47 48 49 |
# File 'lib/chef/provider/chef_container.rb', line 47 def keys { 'containername' => :name, 'containerpath' => :name } end |
#load_current_resource ⇒ Object
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_json ⇒ Object
39 40 41 |
# File 'lib/chef/provider/chef_container.rb', line 39 def new_json {} end |
#whyrun_supported? ⇒ Boolean
7 8 9 |
# File 'lib/chef/provider/chef_container.rb', line 7 def whyrun_supported? true end |