Class: Chef::Resource::ScalewayVolume

Inherits:
LWRPBase
  • Object
show all
Defined in:
lib/chef/resource/scaleway_volume.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ScalewayVolume

Returns a new instance of ScalewayVolume.



6
7
8
9
10
# File 'lib/chef/resource/scaleway_volume.rb', line 6

def initialize(*args)
  super
  @driver = run_context.chef_provisioning.current_driver
  @chef_server = run_context.cheffish.current_chef_server
end

Instance Method Details

#add_volume_options(options) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/chef/resource/scaleway_volume.rb', line 20

def add_volume_options(options)
  @volume_options = if @volume_options
                      Cheffish::MergedConfig.new(options, @volume_options)
                    else
                      options
                    end
end

#load_prior_resource(*_args) ⇒ Object

We are not interested in Chef’s cloning behavior here.



29
30
31
# File 'lib/chef/resource/scaleway_volume.rb', line 29

def load_prior_resource(*_args)
  Chef::Log.debug("Overloading #{resource_name}.load_prior_resource with NOOP")
end