From 2fa8aa4ff7deaf92c5b69be0c69fee95ce18ac37 Mon Sep 17 00:00:00 2001 From: Alvaro Neira Ayuso Date: Thu, 2 Jan 2020 19:48:14 +0100 Subject: Add session command to init the opengnsys session ogAdmClient has a support for initializing the session in the machine. This new command allows the new ogClient to execute the same script to init the session. The arguments will be received from the server as a json message. Format: { "disk" : "0", "partition" : "1"} --- src/linux/ogOperations.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/linux') diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index 147944f..34ba400 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -23,3 +23,7 @@ def execCMD(cmd): raise ValueError('Error: Incorrect command value') return result.decode('utf-8') + +def procsession(disk, partition): + result = subprocess.check_output([OG_PATH + 'interfaceAdm/IniciarSesion', disk, partition], shell=True) + return result.decode('utf-8') -- cgit v1.2.3-18-g5258