creating response message fixed

This commit is contained in:
Volkan Şahin 2016-04-12 17:31:38 +03:00
parent aabb6c51c6
commit 3e1342b1d9
1 changed files with 5 additions and 2 deletions

View File

@ -18,6 +18,7 @@ class Messaging(object):
self.db_service = scope.getDbService() self.db_service = scope.getDbService()
self.event_manger = scope.getEventManager() self.event_manger = scope.getEventManager()
"""
def response_msg(self, response): def response_msg(self, response):
print("response message") print("response message")
data = {} data = {}
@ -32,6 +33,7 @@ class Messaging(object):
json_data = json.dumps(data) json_data = json.dumps(data)
self.logger.debug('[Messaging] Response message was created') self.logger.debug('[Messaging] Response message was created')
return str(json_data) return str(json_data)
"""
def task_status_msg(self, response): def task_status_msg(self, response):
data = {} data = {}
@ -50,8 +52,8 @@ class Messaging(object):
def policy_status_msg(self, response): def policy_status_msg(self, response):
data = {} data = {}
data['type'] = response.get_type() data['type'] = response.get_type()
data['policyVersion'] = response.get_id() data['policyVersion'] = response.get_policy_version()
data['commandExecutionId'] = response.get_id() data['commandExecutionId'] = response.get_execution_id()
data['responseCode'] = response.get_code() data['responseCode'] = response.get_code()
data['responseMessage'] = response.get_message() data['responseMessage'] = response.get_message()
data['responseData'] = response.get_data() data['responseData'] = response.get_data()
@ -63,6 +65,7 @@ class Messaging(object):
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'