dashboard_controller.rb 350 Bytes
class DashboardController < ApplicationController
  def index
    @lxd_host = LxdHost.find(1)
    @cert = Certificate.find(1)
    @lxd = Lxd::Server.by_host @lxd_host, @cert

    if @lxd.auth == 'untrusted'
      Lxd::Certificate.new.save(@lxd_host, @cert)
      @lxd = Lxd::Server.by_host @lxd_host, @cert
    end
  end
end
# vim: set et ts=2 sw=2: