Sha256: 5d552ff293e94e146ce8692be3209ce5094b63fa7172b593c1aa5aac0a44d1a0

Contents?: true

Size: 909 Bytes

Versions: 14

Compression:

Stored size: 909 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def delete_service(uuid, optional_params = nil)
          # Encode all params
          optional_params = optional_params.each { |k, v| optional_params[k] = URI.encode(v) } if optional_params

          request(
            :expects => [202, 204],
            :method  => 'DELETE',
            :path    => "os-services/#{uuid}",
            :query   => optional_params
          )
        end
      end

      class Mock
        def delete_service(_host, _binary, _optional_params = nil)
          response = Excon::Response.new
          response.status = 204
          response.headers = {
            "Content-Type"   => "text/html; charset=UTF-8",
            "Content-Length" => "0",
            "Date"           => Date.new
          }
          response
        end
      end # mock
    end # openstack
  end # compute
end # fog

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.24 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.23 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.22 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.21 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.20 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.19 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.18 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.17 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.15 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.14 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.13 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.12 lib/fog/compute/openstack/requests/delete_service.rb
fog-openstack-0.1.11 lib/fog/compute/openstack/requests/delete_service.rb