Class: Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/open-dock/providers.rb

Direct Known Subclasses

DigitalOcean, GoogleCloud, Vagrant

Instance Method Summary collapse

Constructor Details

#initializeProvider

Returns a new instance of Provider.



5
6
7
8
9
10
11
12
13
# File 'lib/open-dock/providers.rb', line 5

def initialize
  config_file = "#{Ops::PROVIDERS_DIR}/#{self.class.name.underscore}.yml"
  begin
    config = YAML.load_file config_file
  rescue
    raise "Please, create '#{config_file}' file following gem instructions"
  end
  create_connection config
end

Instance Method Details

#create(config) ⇒ Object



14
15
16
# File 'lib/open-dock/providers.rb', line 14

def create(config)
  raise "CREATE action not implemented"
end

#delete(host) ⇒ Object



17
18
19
# File 'lib/open-dock/providers.rb', line 17

def delete(host)
  raise "DELETE action not implemented"
end

#list_paramsObject



20
21
22
# File 'lib/open-dock/providers.rb', line 20

def list_params
  raise "LIST PARAMS action not implemented"
end