Module: DeltacloudVM::Client::Methods::Driver

Included in:
Connection
Defined in:
lib/deltacloud_vm/client/methods/driver.rb

Instance Method Summary collapse

Instance Method Details

#driver(driver_id) ⇒ Object

Retrieve the given driver

  • driver_id -> Driver to retrieve



37
38
39
40
41
42
# File 'lib/deltacloud_vm/client/methods/driver.rb', line 37

def driver(driver_id)
  from_resource(
    :driver,
    connection.get(api_uri("drivers/#{driver_id}"))
  )
end

#drivers(filter_opts = {}) ⇒ Object

Retrieve list of all drivers

  • filter_opt:

    • :id -> Filter drivers using their ‘id’

    • :state -> Filter drivers by their ‘state’



26
27
28
29
30
31
# File 'lib/deltacloud_vm/client/methods/driver.rb', line 26

def drivers(filter_opts={})
  from_collection(
    :drivers,
    connection.get(api_uri('drivers'), filter_opts)
  )
end

#providersObject

List of the current driver providers



46
47
48
# File 'lib/deltacloud_vm/client/methods/driver.rb', line 46

def providers
  driver(current_driver).providers
end