Sha256: 9b8d66354c3f4d72adae14d9ab15ec55e1faf4f6456b4eb9fa5d3baadc4c4abd

Contents?: true

Size: 585 Bytes

Versions: 35

Compression:

Stored size: 585 Bytes

Contents

module Fog
  module Compute
    class Joyent

      class Mock
        def get_machine(uuid)
          if machine = self.data[:machines][uuid]
            res = Excon::Response.new
            res.status = 200
            res.body = machine
            res
          else
            raise Excon::Errors::NotFound, "Not Found"
          end
        end
      end

      class Real
        def get_machine(uuid)
          request(
            :method => "GET",
            :path => "/my/machines/#{uuid}",
            :expects => 200
          )
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 15 rubygems

Version Path
hpfog-0.0.20 lib/fog/joyent/requests/compute/get_machine.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/joyent/requests/compute/get_machine.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/joyent/requests/compute/get_machine.rb
fog-nirvanix-1.8.2 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.11.1 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.11.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-nirvanix-1.8.1 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.10.1 lib/fog/joyent/requests/compute/get_machine.rb
fog-parser-fix-1.6.1 lib/fog/joyent/requests/compute/get_machine.rb
fog-test-again-1.6.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-test-me-1.10.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-parser-fix-1.6.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.10.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.9.0 lib/fog/joyent/requests/compute/get_machine.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/joyent/requests/compute/get_machine.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/joyent/requests/compute/get_machine.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/joyent/requests/compute/get_machine.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/joyent/requests/compute/get_machine.rb
fog-sgonyea-1.8.1 lib/fog/joyent/requests/compute/get_machine.rb
fog-1.8.0 lib/fog/joyent/requests/compute/get_machine.rb