def checkconfig(): """ returns the display of lxc-checkconfig command """ if session['su'] != 'Yes': return abort(403) return render_template('checkconfig.html', containers=lxc.ls(), cfg=lxc.checkconfig())
def checkconfig(): """ returns the display of lxc-checkconfig command """ if session["su"] != "Yes": return abort(403) return render_template("checkconfig.html", containers=lxc.ls(), cfg=lxc.checkconfig())
def checkconfig(self): """ Returns the display of lxc-checkconfig command. """ # TODO: this should really be done using pyramid permissions if not self.request.user.is_superuser: return HTTPForbidden() return {'cfg': lxc.checkconfig()}