Sha256: 3d37ae6a6c8cb35452a48caa384542a4665268feb8fbf781078ae5aba1e3e290

Contents?: true

Size: 1.9 KB

Versions: 39

Compression:

Stored size: 1.9 KB

Contents

module Fog
  module Storage
    class OpenStack
      class Real

        # Delete a static large object.
        #
        # Deletes the SLO manifest +object+ and all segments that it references.
        # The server will respond with +200 OK+ for all requests.
        # +response.body+ must be inspected for actual results.
        #
        # @param container [String] Name of container.
        # @param object [String] Name of the SLO manifest object.
        # @param options [Hash] Additional request headers.
        #
        # @return [Excon::Response]
        #   * body [Hash] - Results of the operation.
        #     * "Number Not Found" [Integer] - Number of missing segments.
        #     * "Response Status" [String] - Response code for the subrequest of the last failed operation.
        #     * "Errors" [Array<object_name, response_status>]
        #       * object_name [String] - Object that generated an error when the delete was attempted.
        #       * response_status [String] - Response status from the subrequest for object_name.
        #     * "Number Deleted" [Integer] - Number of segments deleted.
        #     * "Response Body" [String] - Response body for Response Status.
        #
        # @see http://docs.openstack.org/api/openstack-object-storage/1.0/content/static-large-objects.html
        def delete_static_large_object(container, object, options = {})
          response = request({
            :expects  => 200,
            :method   => 'DELETE',
            :headers  => options.merge('Content-Type' => 'text/plain',
                                       'Accept' => 'application/json'),
            :path     => "#{Fog::OpenStack.escape(container)}/#{Fog::OpenStack.escape(object)}",
            :query    => { 'multipart-manifest' => 'delete' }
          }, false)
          response.body = Fog::JSON.decode(response.body)
          response
        end

      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
fog-1.22.0 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-1.21.0 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-1.20.0 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-1.19.0 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/openstack/requests/storage/delete_static_large_object.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/openstack/requests/storage/delete_static_large_object.rb