Beispiel #1
0
def main():
    NetMonitor.start()

    config = "/root/nap/api-paste.ini"
    appname = "common"
    wsgi_app = loadapp("config:%s" % config, appname)
    server = make_server('0.0.0.0', 9001, wsgi_app)
    server.serve_forever()
Beispiel #2
0
    def update(self, req, id):
        test_ip = req.headers.get("test_ip")
        default_gw = req.headers.get("default_gw")
        switch_gw = req.headers.get("switch_gw")

        NetMonitor.set(test_ip, default_gw, switch_gw)

        return NetMonitor.show()
Beispiel #3
0
 def update(self, req,id):
     test_ip = req.headers.get("test_ip")
     default_gw = req.headers.get("default_gw")
     switch_gw = req.headers.get("switch_gw")
     
     NetMonitor.set(test_ip, default_gw, switch_gw)
     
     return NetMonitor.show()
Beispiel #4
0
def main():
    NetMonitor.start()
    
    config = "/root/nap/api-paste.ini"
    appname = "common"
    wsgi_app = loadapp("config:%s" % config, appname)
    server = make_server('0.0.0.0',9001,wsgi_app)
    server.serve_forever()
Beispiel #5
0
 def delete(self, req, id):
     NetMonitor.monitor_stop()
     return "net-monitor stop"
Beispiel #6
0
 def show(self, req, id):
     return NetMonitor.show()
Beispiel #7
0
    def create(self, req):
        NetMonitor.monitor_start()

        return "net-monitor start"
Beispiel #8
0
 def index(self, req):
     return NetMonitor.show()
Beispiel #9
0
 def detail(self, req):
     return NetMonitor.show()
Beispiel #10
0
 def delete(self, req,id):
     NetMonitor.monitor_stop()
     return "net-monitor stop"
Beispiel #11
0
 def show(self, req,id):
     return NetMonitor.show()
Beispiel #12
0
 def create(self, req):
     NetMonitor.monitor_start()
     
     return "net-monitor start"
Beispiel #13
0
 def index(self, req):
     return NetMonitor.show()
Beispiel #14
0
 def detail(self,req):
     return NetMonitor.show()