Module: Fog::Provider
- Included in:
- AWS, BareMetalCloud, Bluebox, Brightbox, Clodo, Cloudstack, DNSMadeEasy, DNSimple, Dynect, Ecloud, Glesys, GoGrid, Google, HP, IBM, Joyent, Libvirt, Linode, Local, Ninefold, OpenStack, Ovirt, Rackspace, StormOnDemand, Vcloud, VirtualBox, Vmfusion, Voxel, Vsphere, XenServer, Zerigo
- Defined in:
- lib/rackspace-fog/core/provider.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#[](service_key) ⇒ Object
18 19 20 |
# File 'lib/rackspace-fog/core/provider.rb', line 18 def [](service_key) eval(@services_registry[service_key]).new end |
#service(new_service, path, constant_string) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/rackspace-fog/core/provider.rb', line 22 def service(new_service, path, constant_string) Fog.services[new_service] ||= [] Fog.services[new_service] |= [self.to_s.split('::').last.downcase.to_sym] @services_registry ||= {} @services_registry[new_service] = [self.to_s, constant_string].join('::') require File.join('rackspace-fog', path) end |
#services ⇒ Object
30 31 32 |
# File 'lib/rackspace-fog/core/provider.rb', line 30 def services @services_registry.keys end |