Sha256: 0ea42f99d5af5030f96be39c306531bc7a9747817b82610ea2ffe87614c3a634

Contents?: true

Size: 944 Bytes

Versions: 7

Compression:

Stored size: 944 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def get_snapshot_details(snapshot_id)

          request(
            :expects  => 200,
            :method   => 'GET',
            :path     => "os-snapshots/#{snapshot_id}"
          )
        end

      end

      class Mock

        def get_snapshot_details(detailed=true)
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'snapshot' => {
              'id'                 => '1',
              'displayName'        => Fog::Mock.random_letters(rand(8) + 5),
              'displayDescription' => Fog::Mock.random_letters(rand(12) + 10),
              'size'               => 3,
              'volumeId'           => '4',
              'status'             => 'online',
              'createdAt'          => Time.now
            }
          }
          response
        end
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 4 rubygems

Version Path
fog-parser-fix-1.6.1 lib/fog/openstack/requests/compute/get_snapshot_details.rb
fog-test-again-1.6.0 lib/fog/openstack/requests/compute/get_snapshot_details.rb
fog-parser-fix-1.6.0 lib/fog/openstack/requests/compute/get_snapshot_details.rb
fog-1.6.0 lib/fog/openstack/requests/compute/get_snapshot_details.rb
fog-1.5.0 lib/fog/openstack/requests/compute/get_snapshot_details.rb
rackspace-fog-1.4.2 lib/rackspace-fog/openstack/requests/compute/get_snapshot_details.rb
fog-1.4.0 lib/fog/openstack/requests/compute/get_snapshot_details.rb