Sha256: 10f712a72478948edac1702074ae1abb7ffa2f77d5e4253dc7f341d733b71c6f

Contents?: true

Size: 873 Bytes

Versions: 10

Compression:

Stored size: 873 Bytes

Contents

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

      class Mock
        def console(id, hostname)
          response         = Excon::Response.new
          response.status  = 200
          response.body    = {
            'server_id'  => Fog::Mock.random_numbers(1).to_i,
            'api'        => 'v1',
            'status'     => 'ok',
            'console'    => 'http:\/\/panel.cloudatcost.com:12345\/console.html?servername=123456&hostname=1.1.1.1&sshkey=123456&sha1hash=aBcDeFgG',
            '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/console.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-cloudatcost-0.1.2/lib/fog/cloudatcost/requests/console.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-cloudatcost-0.1.2/lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.2.3 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.2.2 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.2.1 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.2.0 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.1.2 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.1.1 lib/fog/cloudatcost/requests/console.rb
fog-cloudatcost-0.1.0 lib/fog/cloudatcost/requests/console.rb