Sha256: 4113057eff729923479054510dfad68f08280de8ed7ff13a36f60b7a06432f3b
Contents?: true
Size: 842 Bytes
Versions: 39
Compression:
Stored size: 842 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 data[:volumes][attachment_id] && data[:volumes][attachment_id]['attachments'].reject! { |attachment| attachment['serverId'] == server_id } data[:volumes][attachment_id]['status'] = 'available' response.status = 202 response else raise Fog::Compute::OpenStack::NotFound end end end end end end
Version data entries
39 entries across 37 versions & 3 rubygems