예제 #1
0
파일: jms_wmq.py 프로젝트: brtsz/zato
    def handle(self, *args, **kwargs):
        
        params = _get_params(kwargs.get('payload'), ['id', 'cluster_id'], 'data.')
        
        with closing(self.server.odb.session()) as session:

            definition = def_jms_wmq(session, params['cluster_id'], params['id'])
            
            definition_elem = Element('definition')
            
            definition_elem.id = definition.id
            definition_elem.name = definition.name
            definition_elem.host = definition.host
            definition_elem.port = definition.port
            definition_elem.queue_manager = definition.queue_manager
            definition_elem.channel = definition.channel
            definition_elem.cache_open_send_queues = definition.cache_open_send_queues
            definition_elem.cache_open_receive_queues = definition.cache_open_receive_queues
            definition_elem.use_shared_connections = definition.use_shared_connections
            definition_elem.ssl = definition.ssl
            definition_elem.ssl_cipher_spec = definition.ssl_cipher_spec
            definition_elem.ssl_key_repository = definition.ssl_key_repository
            definition_elem.needs_mcd = definition.needs_mcd
            definition_elem.max_chars_printed = definition.max_chars_printed
    
            return ZATO_OK, etree.tostring(definition_elem)