class Kitsune::Kit::Provisioner

def wait_for_status(droplet_id, interval: 5, max_attempts: 24)

Waits until the droplet reaches the 'active' status
def wait_for_status(droplet_id, interval: 5, max_attempts: 24)
  max_attempts.times do |i|
    droplet = @client.droplets.find(id: droplet_id)
    estado = droplet.status
    puts "⏳ Droplet status: #{estado} (#{i + 1}/#{max_attempts})"
    return if estado == "active"
    sleep interval
  end
  abort "❌ Timeout: the Droplet did not reach 'active' status after #{interval * max_attempts} seconds"
end