lib/fog/openstack/requests/compute/delete_volume.rb in fog-maestrodev-1.8.0.20130114204828 vs lib/fog/openstack/requests/compute/delete_volume.rb in fog-maestrodev-1.14.0.20130806165225
- old
+ new
@@ -12,14 +12,21 @@
end
end
class Mock
+
def delete_volume(volume_id)
response = Excon::Response.new
- response.status = 204
- response
+ if list_volumes.body['volumes'].map { |v| v['id'] }.include? volume_id
+ self.data[:volumes].delete(volume_id)
+ response.status = 204
+ response
+ else
+ raise Fog::Compute::OpenStack::NotFound
+ end
end
+
end
end
end
end