Class: Fog::OpenStack::Volume

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/volume/v1/mock.rb,
lib/fog/openstack/volume/v1/real.rb,
lib/fog/openstack/volume/v2/mock.rb,
lib/fog/openstack/volume/v2/real.rb,
lib/fog/openstack/volume/models/backup.rb,
lib/fog/openstack/volume/models/volume.rb,
lib/fog/openstack/volume/models/backups.rb,
lib/fog/openstack/volume/models/volumes.rb,
lib/fog/openstack/volume/models/snapshot.rb,
lib/fog/openstack/volume/models/transfer.rb,
lib/fog/openstack/volume/requests/action.rb,
lib/fog/openstack/volume/models/snapshots.rb,
lib/fog/openstack/volume/models/transfers.rb,
lib/fog/openstack/volume/v1/models/backup.rb,
lib/fog/openstack/volume/v1/models/volume.rb,
lib/fog/openstack/volume/v1/requests/real.rb,
lib/fog/openstack/volume/v2/models/backup.rb,
lib/fog/openstack/volume/v2/models/volume.rb,
lib/fog/openstack/volume/v2/requests/real.rb,
lib/fog/openstack/volume/v1/models/backups.rb,
lib/fog/openstack/volume/v1/models/volumes.rb,
lib/fog/openstack/volume/v2/models/backups.rb,
lib/fog/openstack/volume/v2/models/volumes.rb,
lib/fog/openstack/volume/models/volume_type.rb,
lib/fog/openstack/volume/requests/get_quota.rb,
lib/fog/openstack/volume/v1/models/snapshot.rb,
lib/fog/openstack/volume/v1/models/transfer.rb,
lib/fog/openstack/volume/v2/models/snapshot.rb,
lib/fog/openstack/volume/v2/models/transfer.rb,
lib/fog/openstack/volume/models/volume_types.rb,
lib/fog/openstack/volume/requests/list_zones.rb,
lib/fog/openstack/volume/requests/set_tenant.rb,
lib/fog/openstack/volume/v1/models/snapshots.rb,
lib/fog/openstack/volume/v1/models/transfers.rb,
lib/fog/openstack/volume/v2/models/snapshots.rb,
lib/fog/openstack/volume/v2/models/transfers.rb,
lib/fog/openstack/volume/requests/list_backups.rb,
lib/fog/openstack/volume/requests/list_volumes.rb,
lib/fog/openstack/volume/requests/update_quota.rb,
lib/fog/openstack/volume/v1/models/volume_type.rb,
lib/fog/openstack/volume/v1/requests/real_mock.rb,
lib/fog/openstack/volume/v2/models/volume_type.rb,
lib/fog/openstack/volume/v2/requests/real_mock.rb,
lib/fog/openstack/volume/requests/create_backup.rb,
lib/fog/openstack/volume/requests/create_volume.rb,
lib/fog/openstack/volume/requests/delete_backup.rb,
lib/fog/openstack/volume/requests/delete_volume.rb,
lib/fog/openstack/volume/requests/extend_volume.rb,
lib/fog/openstack/volume/requests/update_volume.rb,
lib/fog/openstack/volume/v1/models/volume_types.rb,
lib/fog/openstack/volume/v2/models/volume_types.rb,
lib/fog/openstack/volume/requests/list_snapshots.rb,
lib/fog/openstack/volume/requests/list_transfers.rb,
lib/fog/openstack/volume/requests/restore_backup.rb,
lib/fog/openstack/volume/models/availability_zone.rb,
lib/fog/openstack/volume/requests/accept_transfer.rb,
lib/fog/openstack/volume/requests/create_snapshot.rb,
lib/fog/openstack/volume/requests/create_transfer.rb,
lib/fog/openstack/volume/requests/delete_metadata.rb,
lib/fog/openstack/volume/requests/delete_snapshot.rb,
lib/fog/openstack/volume/requests/delete_transfer.rb,
lib/fog/openstack/volume/requests/get_quota_usage.rb,
lib/fog/openstack/volume/requests/snapshot_action.rb,
lib/fog/openstack/volume/requests/update_metadata.rb,
lib/fog/openstack/volume/requests/update_snapshot.rb,
lib/fog/openstack/volume/v1/requests/list_volumes.rb,
lib/fog/openstack/volume/v2/requests/list_volumes.rb,
lib/fog/openstack/volume/models/availability_zones.rb,
lib/fog/openstack/volume/requests/replace_metadata.rb,
lib/fog/openstack/volume/v1/requests/create_volume.rb,
lib/fog/openstack/volume/v1/requests/update_volume.rb,
lib/fog/openstack/volume/v2/requests/create_volume.rb,
lib/fog/openstack/volume/v2/requests/update_volume.rb,
lib/fog/openstack/volume/requests/list_volume_types.rb,
lib/fog/openstack/volume/requests/create_volume_type.rb,
lib/fog/openstack/volume/requests/delete_volume_type.rb,
lib/fog/openstack/volume/requests/get_backup_details.rb,
lib/fog/openstack/volume/requests/get_quota_defaults.rb,
lib/fog/openstack/volume/requests/get_volume_details.rb,
lib/fog/openstack/volume/requests/update_volume_type.rb,
lib/fog/openstack/volume/v1/models/availability_zone.rb,
lib/fog/openstack/volume/v1/requests/create_snapshot.rb,
lib/fog/openstack/volume/v2/models/availability_zone.rb,
lib/fog/openstack/volume/v2/requests/create_snapshot.rb,
lib/fog/openstack/volume/v1/models/availability_zones.rb,
lib/fog/openstack/volume/v2/models/availability_zones.rb,
lib/fog/openstack/volume/requests/get_snapshot_details.rb,
lib/fog/openstack/volume/requests/get_transfer_details.rb,
lib/fog/openstack/volume/requests/list_backups_detailed.rb,
lib/fog/openstack/volume/requests/list_volumes_detailed.rb,
lib/fog/openstack/volume/v1/requests/get_volume_details.rb,
lib/fog/openstack/volume/v2/requests/get_volume_details.rb,
lib/fog/openstack/volume/requests/get_volume_type_details.rb,
lib/fog/openstack/volume/requests/list_snapshots_detailed.rb,
lib/fog/openstack/volume/requests/list_transfers_detailed.rb,
lib/fog/openstack/volume/v1/requests/get_snapshot_details.rb,
lib/fog/openstack/volume/v2/requests/get_snapshot_details.rb,
lib/fog/openstack/volume/requests/delete_snapshot_metadata.rb,
lib/fog/openstack/volume/requests/update_snapshot_metadata.rb,
lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb,
lib/fog/openstack/volume/v2/requests/list_volumes_detailed.rb

Direct Known Subclasses

V1, V2

Defined Under Namespace

Modules: AvailabilityZones, Backups, Mock, Real, Snapshots, Transfers, VolumeTypes, Volumes Classes: AvailabilityZone, Backup, Snapshot, 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_cache_ttl,
: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_api_version]

Class Method Summary collapse

Class Method Details

.new(args = {}) ⇒ Object

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

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


22
23
24
25
26
27
28
29
30
# File 'lib/fog/openstack/volume.rb', line 22

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