class RodeoClown::EC2
Constants
- STATUS
Public Class Methods
by_name(name)
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 26 def self.by_name(name) new instances[name] end
create_instance(options)
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 16 def self.create_instance(options) new_instance = instances.create(options) instances.wait_for_status(:running, 2, [*new_instance]) new_instance end
ec2()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 12 def self.ec2 @ec2 ||= AWS::EC2.new end
instances()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 8 def self.instances ec2.instances end
Public Instance Methods
create_instance(options)
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 22 def create_instance(options) self.class.create_instance(options) end
dns_name()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 67 def dns_name ec2.dns_name end
pending?()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 51 def pending? ec2.status == :pending end
reboot()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 47 def reboot ec2.reboot end
running?()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 55 def running? ec2.status == :running end
stopped?()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 59 def stopped? ec2.status == :stopped end
terminated?()
click to toggle source
# File lib/rodeo_clown/ec2.rb, line 63 def terminated? ec2.status == :terminated end