From 4465c6a25ac072a299762a795d4ce51498eb4d33 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 12 Dec 2024 13:14:48 +0100 Subject: 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. --- ogclient | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ogclient b/ogclient index 4734e07..170330e 100755 --- a/ogclient +++ b/ogclient @@ -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, -- cgit v1.2.3-18-g5258