Class: Fog::Volume::OpenStack

Inherits:
Service
  • Object
show all
Defined in:
lib/fog/openstack/volume.rb,
lib/fog/openstack/volume_v1.rb,
lib/fog/openstack/volume_v2.rb,
lib/fog/openstack/models/volume/volume.rb,
lib/fog/openstack/models/volume/volumes.rb,
lib/fog/openstack/models/volume/transfer.rb,
lib/fog/openstack/models/volume/transfers.rb,
lib/fog/openstack/models/volume_v1/volume.rb,
lib/fog/openstack/models/volume_v2/volume.rb,
lib/fog/openstack/requests/volume_v1/real.rb,
lib/fog/openstack/requests/volume_v2/real.rb,
lib/fog/openstack/models/volume_v1/volumes.rb,
lib/fog/openstack/models/volume_v2/volumes.rb,
lib/fog/openstack/models/volume/volume_type.rb,
lib/fog/openstack/models/volume_v1/transfer.rb,
lib/fog/openstack/models/volume_v2/transfer.rb,
lib/fog/openstack/requests/volume/get_quota.rb,
lib/fog/openstack/models/volume/volume_types.rb,
lib/fog/openstack/models/volume_v1/transfers.rb,
lib/fog/openstack/models/volume_v2/transfers.rb,
lib/fog/openstack/requests/volume/list_zones.rb,
lib/fog/openstack/requests/volume/set_tenant.rb,
lib/fog/openstack/models/volume_v1/volume_type.rb,
lib/fog/openstack/models/volume_v2/volume_type.rb,
lib/fog/openstack/requests/volume/list_volumes.rb,
lib/fog/openstack/requests/volume/update_quota.rb,
lib/fog/openstack/requests/volume_v1/real_mock.rb,
lib/fog/openstack/requests/volume_v2/real_mock.rb,
lib/fog/openstack/models/volume_v1/volume_types.rb,
lib/fog/openstack/models/volume_v2/volume_types.rb,
lib/fog/openstack/requests/volume/create_volume.rb,
lib/fog/openstack/requests/volume/delete_volume.rb,
lib/fog/openstack/requests/volume/extend_volume.rb,
lib/fog/openstack/requests/volume/list_snapshots.rb,
lib/fog/openstack/requests/volume/list_transfers.rb,
lib/fog/openstack/models/volume/availability_zone.rb,
lib/fog/openstack/requests/volume/accept_transfer.rb,
lib/fog/openstack/requests/volume/create_transfer.rb,
lib/fog/openstack/requests/volume/delete_snapshot.rb,
lib/fog/openstack/requests/volume/delete_transfer.rb,
lib/fog/openstack/requests/volume/get_quota_usage.rb,
lib/fog/openstack/requests/volume_v1/list_volumes.rb,
lib/fog/openstack/requests/volume_v2/list_volumes.rb,
lib/fog/openstack/models/volume/availability_zones.rb,
lib/fog/openstack/requests/volume_v1/create_volume.rb,
lib/fog/openstack/requests/volume_v2/create_volume.rb,
lib/fog/openstack/requests/volume/list_volume_types.rb,
lib/fog/openstack/models/volume_v1/availability_zone.rb,
lib/fog/openstack/models/volume_v2/availability_zone.rb,
lib/fog/openstack/requests/volume/create_volume_type.rb,
lib/fog/openstack/requests/volume/delete_volume_type.rb,
lib/fog/openstack/requests/volume/get_quota_defaults.rb,
lib/fog/openstack/requests/volume/get_volume_details.rb,
lib/fog/openstack/requests/volume/update_volume_type.rb,
lib/fog/openstack/models/volume_v1/availability_zones.rb,
lib/fog/openstack/models/volume_v2/availability_zones.rb,
lib/fog/openstack/requests/volume/get_snapshot_details.rb,
lib/fog/openstack/requests/volume/get_transfer_details.rb,
lib/fog/openstack/requests/volume/list_volumes_detailed.rb,
lib/fog/openstack/requests/volume_v1/get_volume_details.rb,
lib/fog/openstack/requests/volume_v2/get_volume_details.rb,
lib/fog/openstack/requests/volume/create_volume_snapshot.rb,
lib/fog/openstack/requests/volume/get_volume_type_details.rb,
lib/fog/openstack/requests/volume/list_snapshots_detailed.rb,
lib/fog/openstack/requests/volume/list_transfers_detailed.rb,
lib/fog/openstack/requests/volume_v1/get_snapshot_details.rb,
lib/fog/openstack/requests/volume_v2/get_snapshot_details.rb,
lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb,
lib/fog/openstack/requests/volume_v2/list_volumes_detailed.rb,
lib/fog/openstack/requests/volume_v1/create_volume_snapshot.rb,
lib/fog/openstack/requests/volume_v2/create_volume_snapshot.rb

Direct Known Subclasses

V1, V2

Defined Under Namespace

Modules: AvailabilityZones, Mock, Real, Transfers, VolumeTypes, Volumes Classes: AvailabilityZone, Transfer, V1, V2, Volume, VolumeType

Constant Summary collapse

@@recognizes =
[:openstack_auth_token, :openstack_management_url,
:persistent, :openstack_service_type, :openstack_service_name,
:openstack_tenant, :openstack_tenant_id,
:openstack_api_key, :openstack_username, :openstack_identity_endpoint,
:current_user, :current_tenant, :openstack_region,
:openstack_endpoint_type,
:openstack_project_name, :openstack_project_id,
:openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
:openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id,
:openstack_identity_prefix]

Class Method Summary collapse

Class Method Details

.new(args = {}) ⇒ Object

Fog::Image::OpenStack.new() will return a Fog::Volume::OpenStack::V2 or a Fog::Volume::OpenStack::V1,

choosing the V2 by default, as V1 is deprecated since OpenStack Juno


19
20
21
22
23
24
25
26
27
# File 'lib/fog/openstack/volume.rb', line 19

def self.new(args = {})
  @openstack_auth_uri = URI.parse(args[:openstack_auth_url]) if args[:openstack_auth_url]
  if self.inspect == 'Fog::Volume::OpenStack'
    service = Fog::Volume::OpenStack::V2.new(args) || Fog::Volume::OpenStack::V1.new(args)
  else
    service = super
  end
  service
end