Class: Ogle::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ogle/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Required: host: A string containing the hostname or IP of your glance server



9
10
11
12
13
14
15
16
17
18
# File 'lib/ogle/client.rb', line 9

def initialize options
  @connection = Hugs::Client.new(
    :host         => options[:host],
    :scheme       => options[:scheme] || "http",
    :port         => options[:port] || 9292,
    :user         => options[:user],
    :password     => options[:pass],
    :raise_errors => true
  )
end

Instance Method Details

#imageObject



20
21
22
# File 'lib/ogle/client.rb', line 20

def image
  @image ||= Image.new @connection
end