Esempio n. 1
0
File: zmq.py Progetto: 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)
Esempio n. 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)
Esempio n. 3
0
File: zmq.py Progetto: SciF0r/zato
 def get_data(self, session):
     return out_zmq_list(session, self.request.input.cluster_id, False)
Esempio n. 4
0
File: odb.py Progetto: bboerner/zato
 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)
Esempio n. 5
0
File: odb.py Progetto: 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)
Esempio n. 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)
Esempio n. 7
0
File: odb.py Progetto: 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)
Esempio n. 8
0
 def get_data(self, session):
     return out_zmq_list(session, self.request.input.cluster_id, False)