summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-05-23 13:30:23 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-05-23 13:30:23 +0200
commit737ef8e239b1a846c2c5ecb724825481ac1add47 (patch)
tree192f34cd35ed4fc8512bae780cbf3b888f9b0f6d
parent135673e9db0b3a5e04708d1b0280b7d11c229a38 (diff)
#908 OGAgent for ogLive code clean up.
-rw-r--r--admin/Sources/Clients/ogagent/oglive/Makefile8
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAgent.manifest4
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py22
3 files changed, 17 insertions, 17 deletions
diff --git a/admin/Sources/Clients/ogagent/oglive/Makefile b/admin/Sources/Clients/ogagent/oglive/Makefile
index 84e06107..707bc67c 100644
--- a/admin/Sources/Clients/ogagent/oglive/Makefile
+++ b/admin/Sources/Clients/ogagent/oglive/Makefile
@@ -22,12 +22,12 @@ install-ogagent:
mkdir -p $(SBINDIR)
mkdir -p $(APPSDIR)
mkdir -p $(CFGDIR)
-
+
mkdir $(LIBDIR)/img
-
+
# Cleans up .pyc and cache folders
rm -f $(PYC) $(CACHES)
-
+
cp -r $(SOURCEDIR)/opengnsys $(LIBDIR)/opengnsys
cp -r $(SOURCEDIR)/cfg $(LIBDIR)/cfg
ln -fs $(LIBDIR)/cfg/ogagent.cfg $(CFGDIR)
@@ -35,7 +35,7 @@ install-ogagent:
cp scripts/ogagent $(BINDIR)
chmod 755 $(BINDIR)/ogagent
-
+
uninstall:
rm -rf $(LIBDIR)
rm -f $(BINDIR)/ogagent
diff --git a/admin/Sources/Clients/ogagent/src/OGAgent.manifest b/admin/Sources/Clients/ogagent/src/OGAgent.manifest
index 6f202f5a..307101fc 100644
--- a/admin/Sources/Clients/ogagent/src/OGAgent.manifest
+++ b/admin/Sources/Clients/ogagent/src/OGAgent.manifest
@@ -2,8 +2,8 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
- name="UDSActorService"
- version="1.6.0.0"
+ name="OGAgentService"
+ version="3.0.0.0"
processorArchitecture="x86"
/>
<description>Description</description>
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py
index 4a48a24c..7b14e365 100644
--- a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py
@@ -111,7 +111,7 @@ class OpenGnSysWorker(ServerWorker):
name = 'opengnsys'
interface = None # Bound interface for OpenGnsys
REST = None # REST object
- loggedin = False # User session flag
+ logged_in = False # User session flag
browser = {} # Browser info
commands = [] # Running commands
random = None # Random string for secure connections
@@ -300,7 +300,7 @@ class OpenGnSysWorker(ServerWorker):
"""
user, sep, language = data.partition(',')
logger.debug('Received login for {} with language {}'.format(user, language))
- self.loggedin = True
+ self.logged_in = True
self.REST.sendMessage('ogagent/loggedin', {'ip': self.interface.ip, 'user': user, 'language': language,
'ostype': operations.os_type, 'osversion': operations.os_version})
@@ -309,7 +309,7 @@ class OpenGnSysWorker(ServerWorker):
Sends session logout notification to OpenGnsys server
"""
logger.debug('Received logout for {}'.format(user))
- self.loggedin = False
+ self.logged_in = False
self.REST.sendMessage('ogagent/loggedout', {'ip': self.interface.ip, 'user': user})
def process_ogclient(self, path, get_params, post_params, server):
@@ -342,14 +342,14 @@ class OpenGnSysWorker(ServerWorker):
def process_status(self, path, get_params, post_params, server):
"""
- Returns client status (OS type or execution status) and login status.
+ Returns client status (OS type or execution status) and login status
:param path:
:param get_params:
:param post_params:
:param server:
:return: JSON object {"status": "status_code", "loggedin": boolean}
"""
- res = {'loggedin': self.loggedin}
+ res = {'loggedin': self.logged_in}
try:
res['status'] = operations.os_type.lower()
except KeyError:
@@ -362,7 +362,7 @@ class OpenGnSysWorker(ServerWorker):
@check_secret
def process_reboot(self, path, get_params, post_params, server):
"""
- Launches a system reboot operation.
+ Launches a system reboot operation
:param path:
:param get_params:
:param post_params:
@@ -381,7 +381,7 @@ class OpenGnSysWorker(ServerWorker):
@check_secret
def process_poweroff(self, path, get_params, post_params, server):
"""
- Launches a system power off operation.
+ Launches a system power off operation
:param path:
:param get_params:
:param post_params:
@@ -435,20 +435,20 @@ class OpenGnSysWorker(ServerWorker):
@check_secret
def process_logoff(self, path, get_params, post_params, server):
"""
- Closes user session.
+ Closes user session
"""
logger.debug('Received logoff operation')
- # Send log off message to OGAgent client.
+ # Send log off message to OGAgent client
self.sendClientMessage('logoff', {})
return {'op': 'sent to client'}
@check_secret
def process_popup(self, path, get_params, post_params, server):
"""
- Shows a message popup on the user's session.
+ Shows a message popup on the user's session
"""
logger.debug('Received message operation')
- # Send popup message to OGAgent client.
+ # Send popup message to OGAgent client
self.sendClientMessage('popup', post_params)
return {'op': 'launched'}