Class: Virt::KVM::Volume
Instance Attribute Summary
Attributes inherited from Volume
#allocated_size, #key, #name, #pool, #size, #template_path, #type, #xml_desc
Instance Method Summary
collapse
Methods inherited from Volume
#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/kvm/volume.rb', line 8
def default_template_path
"kvm/volume.xml.erb"
end
|
#default_type ⇒ Object
4
5
6
|
# File 'lib/virt/kvm/volume.rb', line 4
def default_type
"raw"
end
|
#name=(name) ⇒ Object
16
17
18
19
|
# File 'lib/virt/kvm/volume.rb', line 16
def name= name
super name
@name += ".img" unless name.match(/.*\.img$/)
end
|
#path ⇒ Object
12
13
14
|
# File 'lib/virt/kvm/volume.rb', line 12
def path
"#{pool.path}/#{name}"
end
|