Sha256: 83062d2c9c1089bb943ecb44222a469c30538d3003db7d9d31966a3908b5fad6

Contents?: true

Size: 791 Bytes

Versions: 10

Compression:

Stored size: 791 Bytes

Contents

module Fog
  module Compute
    class CloudAtCost
      class Real
        def delete_server(id)
          body = { sid: "#{id}" }
          request(
            :expects => [200],
            :method  => 'POST',
            :path    => 'api/v1/cloudpro/delete.php',
            :body    => body,
          )
        end
      end

      class Mock
        def delete_server(id)
          response         = Excon::Response.new
          response.status  = 200
          response.body    = {
            'result'     => 'successful',
            'api'        => 'v1',
            'action'     => 'delete',
            'status'     => 'ok',
            'taskid'     => 123123123123,
            'time'       => 12312323,
          }
          response
        end
      end
    end
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-cloudatcost-0.1.2/lib/fog/cloudatcost/requests/delete_server.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-cloudatcost-0.1.2/lib/fog/cloudatcost/requests/delete_server.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-cloudatcost-0.1.2/lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.2.3 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.2.2 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.2.1 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.2.0 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.1.2 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.1.1 lib/fog/cloudatcost/requests/delete_server.rb
fog-cloudatcost-0.1.0 lib/fog/cloudatcost/requests/delete_server.rb