Method: CloudProviders::Ssh#terminate_instance!
- Defined in:
- lib/cloud_providers/ssh/ssh.rb
#terminate_instance!(o = {}) ⇒ Object
Terminate an instance by name, or the last instance
46 47 48 49 50 |
# File 'lib/cloud_providers/ssh/ssh.rb', line 46 def terminate_instance!(o={}) thost = o[:name] || running_hosts.last available_hosts << thost.clone SshInstance.new((o.merge(:name=>thost, :status=>'terminated'))) end |