Sha256: 001a1c4cf2791ecdcd53565c7fa0628591f61e35cdeae6d246f9c8d6abfc08fe

Contents?: true

Size: 943 Bytes

Versions: 30

Compression:

Stored size: 943 Bytes

Contents

module Fog
  module NewServers
    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

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/new_servers/requests/add_server.rb
fog-0.2.28 lib/fog/new_servers/requests/add_server.rb
fog-0.2.27 lib/fog/new_servers/requests/add_server.rb
fog-0.2.26 lib/fog/new_servers/requests/add_server.rb
fog-0.2.25 lib/fog/new_servers/requests/add_server.rb
fog-0.2.24 lib/fog/new_servers/requests/add_server.rb
tecnh-fog-0.2.23.vpc lib/fog/new_servers/requests/add_server.rb
fog-0.2.23 lib/fog/new_servers/requests/add_server.rb
fog-0.2.22 lib/fog/new_servers/requests/add_server.rb
fog-0.2.21 lib/fog/new_servers/requests/add_server.rb
fog-0.2.20 lib/fog/new_servers/requests/add_server.rb
fog-0.2.19 lib/fog/new_servers/requests/add_server.rb
fog-0.2.18 lib/fog/new_servers/requests/add_server.rb
fog-0.2.17 lib/fog/new_servers/requests/add_server.rb
fog-0.2.16 lib/fog/new_servers/requests/add_server.rb
fog-0.2.15 lib/fog/new_servers/requests/add_server.rb
fog-0.2.14 lib/fog/new_servers/requests/add_server.rb
fog-0.2.13 lib/fog/new_servers/requests/add_server.rb
fog-0.2.12 lib/fog/new_servers/requests/add_server.rb
fog-0.2.11 lib/fog/new_servers/requests/add_server.rb