Class: Conjure::Service::DigitalOceanAccount

Inherits:
Object
  • Object
show all
Includes:
Provider
Defined in:
lib/conjure/service/digital_ocean_account.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Provider

all, included, providers, register_provider

Class Method Details

.configured?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/conjure/service/digital_ocean_account.rb', line 10

def self.configured?
  Conjure.config.digitalocean_api_key and Conjure.config.digitalocean_client_id
end

Instance Method Details

#bootstrap_optionsObject



22
23
24
25
26
27
28
# File 'lib/conjure/service/digital_ocean_account.rb', line 22

def bootstrap_options
  {
    :flavor_name => "512MB",
    :region_name => (Conjure.config.digitalocean_region || "New York 1"),
    :image_name => "Ubuntu 13.04 x64",
  }
end

#compute_optionsObject



14
15
16
17
18
19
20
# File 'lib/conjure/service/digital_ocean_account.rb', line 14

def compute_options
  {
    :provider => :digitalocean,
    :digitalocean_api_key => Conjure.config.digitalocean_api_key,
    :digitalocean_client_id => Conjure.config.digitalocean_client_id,
  }
end