Module: Fog::Volume
- Defined in:
- lib/rackspace-fog/volume.rb,
lib/rackspace-fog/openstack/volume.rb,
lib/rackspace-fog/openstack/models/volume/volume.rb,
lib/rackspace-fog/openstack/models/volume/volumes.rb,
lib/rackspace-fog/openstack/requests/volume/set_tenant.rb,
lib/rackspace-fog/openstack/requests/volume/list_volumes.rb,
lib/rackspace-fog/openstack/requests/volume/create_volume.rb,
lib/rackspace-fog/openstack/requests/volume/delete_volume.rb,
lib/rackspace-fog/openstack/requests/volume/list_snapshots.rb,
lib/rackspace-fog/openstack/requests/volume/delete_snapshot.rb,
lib/rackspace-fog/openstack/requests/volume/get_volume_details.rb,
lib/rackspace-fog/openstack/requests/volume/get_snapshot_details.rb,
lib/rackspace-fog/openstack/requests/volume/create_volume_snapshot.rb
Defined Under Namespace
Classes: OpenStack
Class Method Summary collapse
Class Method Details
.[](provider) ⇒ Object
4 5 6 |
# File 'lib/rackspace-fog/volume.rb', line 4 def self.[](provider) self.new(:provider => provider) end |
.new(attributes) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rackspace-fog/volume.rb', line 8 def self.new(attributes) attributes = attributes.dup # Prevent delete from having side effects case provider = attributes.delete(:provider).to_s.downcase.to_sym when :openstack require 'rackspace-fog/openstack/volume' Fog::Volume::OpenStack.new(attributes) else raise ArgumentError.new("#{provider} has no identity service") end end |