Sha256: 1354e8475d407b36af44b986a251d335ce60f473be7e864e950f773014cff02d

Contents?: true

Size: 650 Bytes

Versions: 32

Compression:

Stored size: 650 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def get_volume_details(volume_id)
          request(
            :expects  => 200,
            :method   => 'GET',
            :path     => "os-volumes/#{volume_id}"
          )
        end
      end

      class Mock
        def get_volume_details(volume_id)
          response = Excon::Response.new
          if data = self.data[:volumes][volume_id]
            response.status = 200
            response.body = { 'volume' => data }
            response
          else
            raise Fog::Compute::OpenStack::NotFound
          end
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 5 rubygems

Version Path
fog-1.24.0 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.11 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.10 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.9 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.8 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.7 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.6 lib/fog/openstack/requests/compute/get_volume_details.rb
fog-1.23.0 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.4 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.3 lib/fog/openstack/requests/compute/get_volume_details.rb
ns-fog-1.22.2 lib/fog/openstack/requests/compute/get_volume_details.rb
fog-1.22.1 lib/fog/openstack/requests/compute/get_volume_details.rb