Beispiel #1
0
Datei: zmq.py Projekt: brtsz/zato
 def handle(self, *args, **kwargs):
     
     self.zmq.send('zzz', 'zmqpush1')
     
     params = _get_params(kwargs.get('payload'), ['cluster_id'], 'data.')
     
     with closing(self.server.odb.session()) as session:
         item_list = Element('item_list')
         db_items = out_zmq_list(session, params['cluster_id'])
         
         for db_item in db_items:
 
             item = Element('item')
             item.id = db_item.id
             item.name = db_item.name
             item.is_active = db_item.is_active
             item.address = db_item.address
             item.socket_type = db_item.socket_type
 
             item_list.append(item)
 
         return ZATO_OK, etree.tostring(item_list)
Beispiel #2
0
 def get_out_zmq_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing ZMQ connections.
     """
     with closing(self.session()) as session:
         return query.out_zmq_list(session, cluster_id, needs_columns)
Beispiel #3
0
 def get_data(self, session):
     return out_zmq_list(session, self.request.input.cluster_id, False)
Beispiel #4
0
 def get_out_zmq_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing ZMQ connections.
     """
     with closing(self.session()) as session:
         return query.out_zmq_list(session, cluster_id, needs_columns)
Beispiel #5
0
Datei: odb.py Projekt: dsuch/zato
 def get_out_zmq_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing ZMQ connections.
     """
     return out_zmq_list(self._session, cluster_id, needs_columns)
Beispiel #6
0
 def get_out_zmq_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing ZMQ connections.
     """
     return out_zmq_list(self._session, cluster_id, needs_columns)
Beispiel #7
0
Datei: odb.py Projekt: brtsz/zato
 def get_out_zmq_list(self, cluster_id):
     """ Returns a list of outgoing ZMQ connections.
     """
     return out_zmq_list(self._session, cluster_id)
Beispiel #8
0
 def get_data(self, session):
     return out_zmq_list(session, self.request.input.cluster_id, False)