Sha256: 1056ec86e902445d9aa46d5515946716e97bb149fb55c8aa247db7be2b2a72e8

Contents?: true

Size: 623 Bytes

Versions: 85

Compression:

Stored size: 623 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def list_snapshots(detailed=true)

          path = detailed ? 'os-snapshots/detail' : 'os-snapshots'
          request(
            :expects  => 200,
            :method   => 'GET',
            :path     => path
          )
        end

      end

      class Mock

        def list_snapshots(detailed=true)
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'snapshots' => [get_snapshot_details.body["snapshot"]]
          }
          response
        end
      end

    end
  end
end

Version data entries

85 entries across 85 versions & 13 rubygems

Version Path
fog-1.7.0 lib/fog/openstack/requests/compute/list_snapshots.rb
fog-1.6.0 lib/fog/openstack/requests/compute/list_snapshots.rb
fog-1.5.0 lib/fog/openstack/requests/compute/list_snapshots.rb
rackspace-fog-1.4.2 lib/rackspace-fog/openstack/requests/compute/list_snapshots.rb
fog-1.4.0 lib/fog/openstack/requests/compute/list_snapshots.rb