Sha256: a2776f06e9b2b82c10284d9d47de9ceca024a773850f9e527297cbd7a95979a0

Contents?: true

Size: 810 Bytes

Versions: 54

Compression:

Stored size: 810 Bytes

Contents

class Ey::Core::Client
  class Real
    def destroy_storage(id)
      request(
        :method => :delete,
        :path   => "/storages/#{id}",
      )
    end
  end # Real

  class Mock
    def destroy_storage(id)
      request_id  = self.uuid

      self.data[:requests][request_id] = {
        "id"          => request_id,
        "type"        => "deprovision_provider_storage",
        "successful"  => true,
        "started_at"  => Time.now,
        "finished_at" => nil,
        "resource"    => [:storages, id, self.data[:storages][id].merge("deleted_at" => Time.now)],
      }

      response(
        :body    => {"request" => {id: request_id}},
        :status  => 201,
        :headers => {
          "Content-Type" => "application/json; charset=utf8",
        }
      )
    end
  end # Mock
end

Version data entries

54 entries across 54 versions & 3 rubygems

Version Path
ey-core-3.6.0.autoscaling1 lib/ey-core/requests/destroy_storage.rb
ey-core-3.6.4 lib/ey-core/requests/destroy_storage.rb
ey-core-3.6.3 lib/ey-core/requests/destroy_storage.rb
ey-core-3.6.1 lib/ey-core/requests/destroy_storage.rb
groove-ey-core-3.6.3 lib/ey-core/requests/destroy_storage.rb
groove-ey-core-3.6.2 lib/ey-core/requests/destroy_storage.rb
groove-ey-core-3.6.1 lib/ey-core/requests/destroy_storage.rb
ey-core-3.5.0 lib/ey-core/requests/destroy_storage.rb
ey-core-3.4.4 lib/ey-core/requests/destroy_storage.rb
ey-core-3.4.2 lib/ey-core/requests/destroy_storage.rb
ey-core-3.4.1 lib/ey-core/requests/destroy_storage.rb
ey-core-3.4.0 lib/ey-core/requests/destroy_storage.rb
ey-core-3.3.1 lib/ey-core/requests/destroy_storage.rb
ey-core-3.3.0 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.6 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.5 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.4 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.3 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.2 lib/ey-core/requests/destroy_storage.rb
ey-core-3.2.1 lib/ey-core/requests/destroy_storage.rb