Top Level Namespace
Defined Under Namespace
Modules: ApplicationHelper, CloudCLI, CloudClient, ConversionHelper, Deltacloud, HardwareProfilesHelper, MethodSerializer, Mock, OCCIClient, Rack, RightAws, Sinatra
Classes: BaseModel, GoGridClient, Image, Instance, InstanceProfile, Key, Realm, StorageSnapshot, StorageVolume, String
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"},
: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
28
29
30
31
|
# File 'lib/drivers.rb', line 28
def driver_class_name
basename = DRIVERS[DRIVER][:class] || "#{driver_name}Driver"
"Deltacloud::Drivers::#{driver_name}::#{basename}"
end
|
#driver_mock_source_name ⇒ Object
37
38
39
|
# File 'lib/drivers.rb', line 37
def driver_mock_source_name
return File.join('deltacloud', 'drivers', DRIVER.to_s, "#{DRIVER}_driver.rb") if driver_name.eql? 'Mock'
end
|
#driver_name ⇒ Object
24
25
26
|
# File 'lib/drivers.rb', line 24
def driver_name
DRIVERS[DRIVER][:name]
end
|
#driver_source_name ⇒ Object
33
34
35
|
# File 'lib/drivers.rb', line 33
def driver_source_name
File.join("deltacloud", "drivers", "#{DRIVER}", "#{DRIVER}_driver.rb")
end
|