Sha256: 5951ff469df1e8648c86e2cecb4f100f51dc7d914f120606605a7a7f7ac4fe83

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

module Fog
  module Compute
    class DigitalOcean
      class Real

        #
        # FIXME: missing ssh keys support
        #
        def create_server( name, 
                           size_id, 
                           image_id, 
                           region_id,
                           options = {} )

          query_hash = {
            :name        => name,
            :size_id     => size_id,
            :image_id    => image_id,
            :region_id   => region_id
          }

          if options[:ssh_key_ids]
            query_hash[:ssh_key_ids] = options[:ssh_key_ids]
          end
          
          request(
            :expects  => [200],
            :method   => 'GET',
            :path     => 'droplets/new',
            :query    => query_hash
          )
        end

      end

      class Mock

        def create_server( name, 
                           size_id, 
                           image_id, 
                           region_id,
                           options = {} )
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cifrado-0.2.1 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb
cifrado-0.2.0 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb
cifrado-0.1.3 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb
cifrado-0.1.2 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb
cifrado-0.1.1 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb
cifrado-0.1 vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb