Class: Cloudspeq::Providers::DigitalOcean::Machine

Inherits:
Base::Machine
  • Object
show all
Defined in:
lib/cloudspeq/providers/digital_ocean.rb

Instance Method Summary collapse

Methods inherited from Base::Machine

#attributes, #exec, #exec!, #initialize, #restart, #root_exec, #shutdown, #startup, #sync

Constructor Details

This class inherits a constructor from Cloudspeq::Providers::Base::Machine

Instance Method Details

#destroyObject



117
118
119
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 117

def destroy
  ::Digitalocean::Droplet.destroy(attributes.id)
end

#ip_addressObject



101
102
103
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 101

def ip_address
  attributes.ip_address
end

#nameObject



97
98
99
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 97

def name
  attributes.name
end

#power_cycleObject



109
110
111
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 109

def power_cycle
  ::Digitalocean::Droplet.power_cycle(attributes.id)
end

#power_offObject



105
106
107
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 105

def power_off
  ::Digitalocean::Droplet.power_off(attributes.id)
end

#power_onObject



113
114
115
# File 'lib/cloudspeq/providers/digital_ocean.rb', line 113

def power_on
  ::Digitalocean::Droplet.power_on(attributes.id)
end