Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define_instance_states do
- start.to( :pending ) .automatically
- pending.to( :running ) .automatically
- pending.to( :stopping ) .on( :stop )
- pending.to( :stopped ) .automatically
- stopped.to( :running ) .on( :start )
- running.to( :running ) .on( :reboot )
- running.to( :stopping ) .on( :stop )
- shutting_down.to( :stopped ) .automatically
- stopped.to( :finish ) .automatically
- end
- def convert_state(ec2_state)
- case ec2_state
- when "terminated"
- "STOPPED"
- when "stopped"
- "STOPPED"
- when "running"
- "RUNNING"
- when "pending"
- "PENDING"
- when "shutting-down"
- "STOPPED"
- end
- end
Add Comment
Please, Sign In to add comment