lib/cluster_chef/compute.rb
# Magic method to describe a volume
# * returns the named volume, creating it if necessary.
# * executes the block (if any) in the volume's context
#
# @example
#   # a 1 GB volume at '/data' from the given snapshot
#   volume(:data) do
#     size        1
#     mount_point '/data'
#     snapshot_id 'snap-12345'
#   end
#
# @param volume_name [String] an arbitrary handle -- you can use the device
#   name, or a descriptive symbol.
# @param hsh [Hash] a hash of attributes to pass down.
#
Magic method to describe a volume
returns the named volume, creating it if necessary.
executes the block (if any) in the volume's context
Magic method to describe a volume returns the named volume creating it if necessary . executes the block ( if any ) in the volume ' s context
def volume volume_name, hsh={}, &block
      volumes[volume_name] ||= ClusterChef::Volume.new(:parent => self, :name => volume_name)
      volumes[volume_name].configure(hsh, &block)
      volumes[volume_name]
    end
def volume volume_name , hsh = { } , & block volumes [ volume_name ] ||= ClusterChef :: Volume . new ( :parent => self , :name => volume_name ) volumes [ volume_name ] . configure ( hsh , & block ) volumes [ volume_name ] end
Magic method to describe a volume
 returns the named volume, creating it if necessary.
Magic method to describe a volume returns the named volume creating it if necessary .
volume_name
an arbitrary handle -- you can use the device name, or a descriptive symbol.
an arbitrary handle -- you can use the device name or a descriptive symbol .
hsh
a hash of attributes to pass down.
a hash of attributes to pass down .
block
example
a 1 GB volume at '/data' from the given snapshot volume(:data) do size 1 mount_point '/data' snapshot_id 'snap-12345' end
a 1 GB volume at ' / data ' from the given snapshot volume ( : data ) do size 1 mount_point ' / data ' snapshot_id ' snap - 12345 ' end