def ping(req, id, cluster_id): response = id_only_service(req, 'zato.http-soap.ping', id, 'Could not ping the connection, e:`{}`') if isinstance(response, HttpResponseServerError): return response else: if response.data.is_success: return HttpResponse(response.data.info) else: return HttpResponseServerError(response.data.info)
def post_process_return_data(self, return_data): for name in ('connect', 'message', 'close'): id_field_name = 'on_{}_service_id'.format(name) service_id = self.input_dict.get(id_field_name) if service_id: response = id_only_service( self.req, 'zato.service.get-by-id', service_id, initial={'cluster_id': self.cluster_id}) name_field_name = 'on_{}_service_name'.format(name) return_data[name_field_name] = response.data['name'] return return_data
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.definition.jms-wmq.ping', id, 'Could not ping IBM MQ definition, e:`{}`') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.search.solr.ping', id, 'Could not ping the Solr connection, e:[{e}]') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.outgoing.stomp.ping', id, 'Could not ping the STOMP connection, e:[{e}]') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)
def toggle_active(req, server_name, server_pid, task_id, cluster_id): return id_only_service(req, 'pubsub.task.toggle-active', id, 'Task active flag could not be toggled, e:`{}`')
def clear_messages(req, server_name, server_pid, task_id, cluster_id): return id_only_service(req, 'pubsub.task.clear-messages', id, 'Could not clear messages, e:`{}`')
def toggle_active(req, server_name, server_pid, task_id, cluster_id): return id_only_service(req, 'pubsub.task.toggle-active', id, 'Could not toggle server\'s active flag, e:`{}`')
def delete(req, id, cluster_id): id_only_service(req, 'zato.http-soap.delete', id, 'Could not delete the object, e:[{e}]') return HttpResponse()
def reload_wsdl(req, id, cluster_id): ret = id_only_service(req, 'zato.http-soap.reload-wsdl', id, 'WSDL could not be reloaded, e:`{}`') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse('WSDL reloaded, check server logs for details')
def delete(req, id, cluster_id): id_only_service(req, 'zato.http-soap.delete', id, 'Object could not be deleted, e:`{}`') return HttpResponse()
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.outgoing.odoo.ping', id, 'Could not ping the Odoo connection, e:[{e}]') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)
def reload_wsdl(req, id, cluster_id): ret = id_only_service(req, 'zato.http-soap.reload-wsdl', id, 'Could not reload the WSDL, e:[{e}]') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse('WSDL reloaded, check server logs for details')
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.email.smtp.ping', id, 'Could not ping the SMTP connection, e:`{}`') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)
def ping(req, id, cluster_id): ret = id_only_service(req, 'zato.channel.stomp.ping', id, 'Could not ping the STOMP connection, e:[{e}]') if isinstance(ret, HttpResponseServerError): return ret return HttpResponse(ret.data.info)