Sha256: 60cde424acef87733ea9edf06efc6d05388be115fcb7fe580a599402e881f872
Contents?: true
Size: 763 Bytes
Versions: 55
Compression:
Stored size: 763 Bytes
Contents
module Fog module Compute class OpenStack class Real def get_server_volumes(server_id) request( :expects => 200, :method => 'GET', :path => "/servers/#{server_id}/os-volume_attachments" ) end end class Mock def get_server_volumes(server_id) response = Excon::Response.new response.status = 200 data = self.data[:volumes].values.find_all do |vol| vol['attachments'].find { |attachment| attachment["serverId"] == server_id } end response.body = { 'volumeAttachments' => data.collect! { |vol| vol['attachments'] }.flatten(1) } response end end end end end
Version data entries
55 entries across 55 versions & 3 rubygems