diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-12-12 13:14:48 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-12-12 13:14:48 +0100 |
commit | 4465c6a25ac072a299762a795d4ce51498eb4d33 (patch) | |
tree | 20cee858d8e57f1c154476ea560fb34317b6cc9b | |
parent | 203f3e55339c878e750829588c5430240d3dd486 (diff) |
ogclient: remove session event cmd commands
Remove commands to send session events as the session report
logic is now implemented in the ogOperations.py file of each
platform.
-rwxr-xr-x | ogclient | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -24,27 +24,9 @@ from src.ogClient import * from src.log import * -def send_event_dgram(msg, ip='127.0.0.1', port=55885): - sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - sock.sendto(bytes(msg, "utf-8"), (ip, port)) - - def create_parser(): - events = ['login', 'logout'] parser = argparse.ArgumentParser() parser.set_defaults(func=None) - subparsers = parser.add_subparsers() - - parser_event = subparsers.add_parser('event') - - subparsers_event = parser_event.add_subparsers() - parser_event_login = subparsers_event.add_parser('login') - parser_event_login.set_defaults(func=lambda x: send_event_dgram(f'session start {x.user}')) - parser_event_login.add_argument('user', type=str) - parser_event_logout = subparsers_event.add_parser('logout') - parser_event_logout.set_defaults(func=lambda x: send_event_dgram(f'session stop {x.user}')) - parser_event_logout.add_argument('user', type=str) - parser.add_argument('-c', '--config', default="", help='ogClient JSON config file path') parser.add_argument('--debug', default=False, |