Module: Virt

Defined in:
lib/virt.rb,
lib/virt/host.rb,
lib/virt/pool.rb,
lib/virt/util.rb,
lib/virt/guest.rb,
lib/virt/volume.rb,
lib/virt/interface.rb,
lib/virt/connection.rb

Defined Under Namespace

Modules: KVM, Util, VMWare Classes: Connection, Guest, Host, Interface, Pool, Volume

Class Method Summary collapse

Class Method Details

.connect(uri, options = {}) ⇒ Object



14
15
16
# File 'lib/virt.rb', line 14

def connect uri, options = {}
  @connection = Virt::Connection.new uri, options
end

.connectionObject



18
19
20
21
# File 'lib/virt.rb', line 18

def connection
  return @connection if @connection and !@connection.closed?
  raise "No Connection or connection has been closed"
end