Top Level Namespace
Defined Under Namespace
Modules: ApplicationHelper, CloudCLI, CloudClient, ConversionHelper, Deltacloud, HardwareProfilesHelper, MethodSerializer, Mock, OCCIClient, Rack, RightAws, Sinatra
Classes: BaseModel, Blob, Bucket, 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"},
: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
29
30
31
32
|
# File 'lib/drivers.rb', line 29
def driver_class_name
basename = DRIVERS[DRIVER][:class] || "#{driver_name}Driver"
"Deltacloud::Drivers::#{driver_name}::#{basename}"
end
|
#driver_mock_source_name ⇒ Object
38
39
40
|
# File 'lib/drivers.rb', line 38
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
25
26
27
|
# File 'lib/drivers.rb', line 25
def driver_name
DRIVERS[DRIVER][:name]
end
|
#driver_source_name ⇒ Object
34
35
36
|
# File 'lib/drivers.rb', line 34
def driver_source_name
File.join("deltacloud", "drivers", "#{DRIVER}", "#{DRIVER}_driver.rb")
end
|