Sha256: 4c4ba51ae8e23dbe4451e161fd9b502aea03c68d0fa3a6ffc2aa044eaff945a5

Contents?: true

Size: 627 Bytes

Versions: 44

Compression:

Stored size: 627 Bytes

Contents

require 'fog/openstack/models/collection'

module Fog
  module Volume
    class OpenStack
      module Snapshots
        def all(options = {})
          load_response(service.list_snapshots_detailed(options), 'snapshots')
        end

        def summary(options = {})
          load_response(service.list_snapshots(options), 'snapshots')
        end

        def get(snapshots_id)
          snapshot = service.get_snapshot_details(snapshots_id).body['snapshot']
          if snapshot
            new(snapshot)
          end
        rescue Fog::Volume::OpenStack::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

44 entries across 42 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.10 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.1.30 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.1.29 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.9 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.1.28 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.8 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.7 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.6 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.5 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.4 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.3 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.2 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.3.0 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.2.4 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.2.3 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.2.2 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.2.1 lib/fog/volume/openstack/models/snapshots.rb
fog-openstack-0.2.0 lib/fog/volume/openstack/models/snapshots.rb
fog-zj-0.1.28 lib/fog/volume/openstack/models/snapshots.rb