mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-13 05:42:19 +03:00
missing plugin message created
This commit is contained in:
parent
95abee215d
commit
daa078c90d
1 changed files with 14 additions and 6 deletions
|
@ -18,6 +18,16 @@ class Messaging(object):
|
||||||
self.db_service = scope.getDbService()
|
self.db_service = scope.getDbService()
|
||||||
self.event_manger = scope.getEventManager()
|
self.event_manger = scope.getEventManager()
|
||||||
|
|
||||||
|
def missing_plugin_message(self, plugin):
|
||||||
|
data = {}
|
||||||
|
data['type'] = 'MISSING_PLUGIN'
|
||||||
|
data['pluginName'] = plugin.get_name()
|
||||||
|
data['pluginVersion'] = plugin.get_version()
|
||||||
|
|
||||||
|
json_data = json.dumps(data)
|
||||||
|
self.logger.debug('[Messaging]Missing plugin message was created')
|
||||||
|
return str(json_data)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def response_msg(self, response):
|
def response_msg(self, response):
|
||||||
print("response message")
|
print("response message")
|
||||||
|
@ -64,8 +74,6 @@ class Messaging(object):
|
||||||
self.logger.debug('[Messaging] Policy status message was created')
|
self.logger.debug('[Messaging] Policy status message was created')
|
||||||
return str(json_data)
|
return str(json_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def login_msg(self, username):
|
def login_msg(self, username):
|
||||||
data = {}
|
data = {}
|
||||||
data['type'] = 'LOGIN'
|
data['type'] = 'LOGIN'
|
||||||
|
@ -103,14 +111,14 @@ class Messaging(object):
|
||||||
def registration_msg(self):
|
def registration_msg(self):
|
||||||
data = {}
|
data = {}
|
||||||
data['type'] = 'REGISTER'
|
data['type'] = 'REGISTER'
|
||||||
data['from'] = self.db_service.select_one_result('registration','jid',' 1=1')#str(self.conf_manager.get('REGISTRATION', 'from'))
|
data['from'] = self.db_service.select_one_result('registration', 'jid', ' 1=1') # str(self.conf_manager.get('REGISTRATION', 'from'))
|
||||||
data['password'] = self.db_service.select_one_result('registration','password',' 1=1')
|
data['password'] = self.db_service.select_one_result('registration', 'password', ' 1=1')
|
||||||
params = self.db_service.select_one_result('registration','params',' 1=1')
|
params = self.db_service.select_one_result('registration', 'params', ' 1=1')
|
||||||
json_params = json.loads(str(params))
|
json_params = json.loads(str(params))
|
||||||
data['macAddresses'] = json_params['macAddresses']
|
data['macAddresses'] = json_params['macAddresses']
|
||||||
data['ipAddresses'] = json_params['ipAddresses']
|
data['ipAddresses'] = json_params['ipAddresses']
|
||||||
data['hostname'] = json_params['hostname']
|
data['hostname'] = json_params['hostname']
|
||||||
data['timestamp'] = self.db_service.select_one_result('registration','timestamp',' 1=1')
|
data['timestamp'] = self.db_service.select_one_result('registration', 'timestamp', ' 1=1')
|
||||||
json_data = json.dumps(data)
|
json_data = json.dumps(data)
|
||||||
self.logger.debug('[Messaging] Registration message was created')
|
self.logger.debug('[Messaging] Registration message was created')
|
||||||
return json_data
|
return json_data
|
||||||
|
|
Loading…
Reference in a new issue