예제 #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
파일: main.py 프로젝트: jaags/LXC-Web-Panel
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
파일: main.py 프로젝트: robvdl/lwp-pyramid
    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()}