This will become a rails application as client for LXD.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
459 B

class DashboardController < ApplicationController
def index
@lxd_host = LxdHost.find(1)
@cert = Certificate.find(1)
@api = Lxd::API.get @lxd_host, @cert
@lxd_config = Lxd::Config.get @api
if @lxd_config.auth == 'untrusted'
# Here the controller has to ask for the password
cert = Lxd::Certificate.new api: @api
cert.save 'xxxxxxxxxx'
@lxd_config = Lxd::Config.get @api
end
end
end
# vim: set et ts=2 sw=2: