Sha256: 10a8d0364573b38f19cd4ca27a34d2f0e5c6c4bbd0be39c4f80b32c9a5623b34

Contents?: true

Size: 1 KB

Versions: 44

Compression:

Stored size: 1 KB

Contents

module Fog
  module NewServers
    class Compute
      class Real

        # Boot a new server
        #
        # ==== Parameters
        # * planId<~String> - The id of the plan to boot the server with
        # * options<~Hash>: optional extra arguments
        #   * imageId<~String>  - Optional image to boot server from
        #   * name<~String>     - Name to boot new server with
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'server'<~Hash>:
        #       * 'id'<~String> - Id of the image
        #
        def add_server(plan_id, options = {})
          request(
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::ToHashDocument.new,
            :path     => 'api/addServer',
            :query    => {'planId' => plan_id}.merge!(options)
          )
        end

      end

      class Mock

        def add_server(server_id)
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
fog-0.5.1 lib/fog/compute/requests/new_servers/add_server.rb
fog-0.5.0 lib/fog/compute/requests/new_servers/add_server.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/new_servers/add_server.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/new_servers/add_server.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/new_servers/add_server.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/new_servers/add_server.rb
fog-0.4.1 lib/fog/compute/requests/new_servers/add_server.rb
fog-0.4.0 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.34 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.33 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.32 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.31 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.30 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.29 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.28 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.27 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.26 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.25 lib/fog/new_servers/requests/compute/add_server.rb
fog-0.3.24 lib/fog/new_servers/requests/compute/add_server.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/new_servers/requests/compute/add_server.rb