mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
Updated lfcli_base for webconsole
This commit is contained in:
@@ -8,7 +8,7 @@ from pprint import pprint
|
|||||||
import LANforge.LFUtils
|
import LANforge.LFUtils
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
import argparse
|
import argparse
|
||||||
|
import LANforge.LFRequest
|
||||||
|
|
||||||
class LFCliBase:
|
class LFCliBase:
|
||||||
# do not use `super(LFCLiBase,self).__init__(self, host, port, _debug)
|
# do not use `super(LFCLiBase,self).__init__(self, host, port, _debug)
|
||||||
@@ -256,4 +256,14 @@ class LFCliBase:
|
|||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
# use this function to add an event You can see these events when watching websocket_client at 8081 port
|
||||||
|
def add_event(self, message=None, event_id="new", name="custom", priority=1, debug_=False):
|
||||||
|
data = {
|
||||||
|
"event_id": event_id,
|
||||||
|
"details": message,
|
||||||
|
"priority": priority,
|
||||||
|
"name": name
|
||||||
|
}
|
||||||
|
self.json_post("/cli-json/add_event", data, debug_=debug_)
|
||||||
|
|
||||||
# ~class
|
# ~class
|
||||||
|
|||||||
Reference in New Issue
Block a user