Sha256: be9d7d255b4c0c77985d6e2b6213ab33cb3748f734017972c2d33f4c75e8bb32
Contents?: true
Size: 789 Bytes
Versions: 36
Compression:
Stored size: 789 Bytes
Contents
module Fog module Compute class OpenStack class Real def detach_volume(server_id, attachment_id) request( :expects => 202, :method => 'DELETE', :path => "servers/%s/os-volume_attachments/%s" % [server_id, attachment_id] ) end end class Mock def detach_volume(server_id, attachment_id) response = Excon::Response.new if self.data[:volumes][attachment_id] && self.data[:volumes][attachment_id]['attachments'].reject! { |attachment| attachment['serverId'] == server_id } response.status = 202 response else raise Fog::Compute::OpenStack::NotFound end end end end end end
Version data entries
36 entries across 36 versions & 5 rubygems