Sha256: 4a7b1d4366526fdb7ca9faa4e484530dec83de710346e9da3f0d5be3357f9a2c

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

module Fog
  module Compute
    class DigitalOcean
      class Real
        def get_droplet_action(droplet_id, action_id)
          request(
            :expects => [200],
            :method  => 'GET',
            :path    => "v2/droplets/#{droplet_id}/actions/#{action_id}",
          )
        end
      end

      class Mock
        def get_droplet_action(droplet_id, action)
          response         = Excon::Response.new
          response.status  = 201
          response.body    = {
            'action' => {
              'id'            => Fog::Mock.random_numbers(1).to_i,
              'status'        => "in-progress",
              'type'          => "change_kernel",
              'started_at'    => "2014-11-14T16:31:00Z",
              'completed_at'  => nil,
              'resource_id'   => id,
              'resource_type' => "droplet",
              'region'        => "nyc3",
              'region_slug'   => "nyc3"
            }
          }
          response
        end
      end
    end
  end
end

Version data entries

5 entries across 3 versions & 2 rubygems

Version Path
fog-digitalocean-0.4.0 lib/fog/compute/digitalocean/requests/get_droplet_action.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/get_droplet_action.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/get_droplet_action.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-digitalocean-0.3.0/lib/fog/digitalocean/requests/compute/get_droplet_action.rb
fog-digitalocean-0.3.0 lib/fog/digitalocean/requests/compute/get_droplet_action.rb