Module: Deltacloud
- Defined in:
- lib/drivers.rb,
lib/deltacloud/state_machine.rb,
lib/deltacloud/hardware_profile.rb,
lib/deltacloud/base_driver/features.rb,
lib/deltacloud/drivers/ec2/ec2_driver.rb,
lib/deltacloud/base_driver/base_driver.rb,
lib/deltacloud/drivers/mock/mock_driver.rb,
lib/deltacloud/drivers/azure/azure_driver.rb,
lib/deltacloud/drivers/rhevm/rhevm_driver.rb,
lib/deltacloud/drivers/gogrid/gogrid_driver.rb,
lib/deltacloud/drivers/rackspace/rackspace_client.rb,
lib/deltacloud/drivers/rackspace/rackspace_driver.rb,
lib/deltacloud/drivers/terremark/terremark_driver.rb,
lib/deltacloud/drivers/opennebula/opennebula_driver.rb,
lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb,
lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
Overview
author: Michael Neale TODO: catch generic errors in JSON response and throw (probably)
Defined Under Namespace
Modules: BackendCapability, Drivers, Validation
Classes: AuthException, BackendError, BackendFeatureUnsupported, BaseDriver, DuplicateFeatureDeclError, FeatureError, HardwareProfile, StateMachine, UndeclaredFeatureError
Constant Summary
collapse
- DRIVERS =
{
:ec2 => { :name => "EC2" },
:rackspace => { :name => "Rackspace" },
:gogrid => { :name => "Gogrid" },
:rhevm => { :name => "RHEVM" },
:rimuhosting => { :name => "RimuHosting"},
:opennebula => { :name => "Opennebula", :class => "OpennebulaDriver" },
:terremark => { :name => "Terremark"},
:azure => { :name => "Azure" },
:mock => { :name => "Mock" }
}
- DEFAULT_COLLECTIONS =
[
:hardware_profiles,
:images,
:instances,
:instance_states,
:realms,
:storage_volumes,
:storage_snapshots
]
- DRIVER =
ENV['API_DRIVER'] ? ENV['API_DRIVER'].to_sym : :mock
Instance Method Summary
collapse
Instance Method Details
#driver_class_name ⇒ Object
#driver_mock_source_name ⇒ Object
60
61
62
63
|
# File 'lib/drivers.rb', line 60
def driver_mock_source_name
return File.join('deltacloud', 'drivers', "#{driver_symbol}",
"#{driver_symbol}_driver.rb") if driver_name.eql? 'Mock'
end
|
#driver_source_name ⇒ Object
56
57
58
|
# File 'lib/drivers.rb', line 56
def driver_source_name
File.join("deltacloud", "drivers", "#{driver_symbol}", "#{driver_symbol}_driver.rb")
end
|
#driver_symbol ⇒ Object
43
44
45
|
# File 'lib/drivers.rb', line 43
def driver_symbol
(Thread.current[:driver] || DRIVER).to_sym
end
|