Class: Chef::Provider::OneImage

Inherits:
LWRPBase
  • Object
show all
Defined in:
lib/chef/provider/one_image.rb

Overview

Implementation of Provider class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



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

def image
  @image
end

Instance Method Details

#action_handlerObject



40
41
42
# File 'lib/chef/provider/one_image.rb', line 40

def action_handler
  @action_handler ||= Chef::Provisioning::ChefProviderActionHandler.new(self)
end

#exists?Boolean

Returns:

  • (Boolean)


44
45
46
47
48
# File 'lib/chef/provider/one_image.rb', line 44

def exists?
  new_driver = driver
  @image = new_driver.one.get_resource(:image, :name => @new_resource.name)
  !@image.nil?
end

#load_current_resourceObject



37
38
# File 'lib/chef/provider/one_image.rb', line 37

def load_current_resource
end

#whyrun_supported?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/chef/provider/one_image.rb', line 33

def whyrun_supported?
  true
end