summaryrefslogtreecommitdiffstats
path: root/funcweb/funcweb/controllers.py
blob: 0754526417ee12cd7c3c72ce922d3941a1d73094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import logging
log = logging.getLogger(__name__)

from turbogears import controllers, expose, flash
from func.overlord.client import Client

class Root(controllers.RootController):

    @expose(template="funcweb.templates.minions")
    def minions(self):
        """ Return a list of our minions """
        fc = Client("*")
        return dict(minions=fc.system.list_methods())

    @expose(template="funcweb.templates.minion")
    def minion(self, name):
        """ View all modules for a given minion """
        fc = Client(name)
        return dict(modules=fc.system.list_modules())

    index = minions