Sha256: eeecb22ec8f5462260b68c733053a9cbbedb8aadf884c34b3ad8283c4bdb96f4
Contents?: true
Size: 793 Bytes
Versions: 48
Compression:
Stored size: 793 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
48 entries across 48 versions & 3 rubygems