Class: EC2Launcher::DSL::BlockDevice

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2launcher/dsl/block_device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBlockDevice

Returns a new instance of BlockDevice.



20
21
22
23
24
# File 'lib/ec2launcher/dsl/block_device.rb', line 20

def initialize()
	@count = 1
	@group = "root"
	@user = "root"
end

Instance Attribute Details

#mount_pointObject (readonly)

Returns the value of attribute mount_point.



9
10
11
# File 'lib/ec2launcher/dsl/block_device.rb', line 9

def mount_point
  @mount_point
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/ec2launcher/dsl/block_device.rb', line 10

def name
  @name
end

Instance Method Details

#is_raid?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/ec2launcher/dsl/block_device.rb', line 26

def is_raid?()
	@raid_level.nil?
end

#to_json(*a) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'lib/ec2launcher/dsl/block_device.rb', line 30

def to_json(*a)
	{
		"name" => @name,
		"count" => @count,
		"raid_level" => @raid_level,
		"mount_point" => @mount,
		"owner" => @owner,
		"group" => @group
	}.to_json(*a)
end