Module: Virt::Util

Included in:
Guest, Pool, Volume
Defined in:
lib/virt/util.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) to_gb(bytes)



11
12
13
# File 'lib/virt/util.rb', line 11

def to_gb bytes
  bytes.to_i / 1073741824
end

- (Object) xml

return templated xml to be used by libvirt



7
8
9
# File 'lib/virt/util.rb', line 7

def xml
  ERB.new(template, nil, '-').result(binding)
end