Class: Fog::Volume::OpenStack

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

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