Пример #1
0
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())
Пример #2
0
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())
Пример #3
0
    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()}