Class: Virt::VMWare::Volume
Instance Attribute Summary
Attributes inherited from Virt::Volume
#allocated_size, #key, #name, #pool, #size, #template_path, #type, #xml_desc
Instance Method Summary
collapse
#destroy, #initialize, #new?, #save
Methods included from Util
#to_gb, #xml
Constructor Details
This class inherits a constructor from Virt::Volume
Instance Method Details
#default_template_path ⇒ Object
8
9
10
|
# File 'lib/virt/vmware/volume.rb', line 8
def default_template_path
"vmware/volume.xml.erb"
end
|
#default_type ⇒ Object
4
5
6
|
# File 'lib/virt/vmware/volume.rb', line 4
def default_type
"raw"
end
|
#name=(name) ⇒ Object
16
17
18
19
|
# File 'lib/virt/vmware/volume.rb', line 16
def name= name
super name
@name += ".vmdk" unless name.match(/.*\.vmdk$/)
end
|
#path ⇒ Object
12
13
14
|
# File 'lib/virt/vmware/volume.rb', line 12
def path
"[#{pool.name}] #{self}"
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/virt/vmware/volume.rb', line 21
def to_s
"#{title}/#{name}"
end
|