예제 #1
0
파일: ftp.py 프로젝트: brtsz/zato
    def handle(self, *args, **kwargs):
        
        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_ftp_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.host = db_item.host
                item.port = db_item.port
                item.user = db_item.user
                item.acct = db_item.acct
                item.timeout = db_item.timeout
                item.dircache = db_item.dircache

                item_list.append(item)

            return ZATO_OK, etree.tostring(item_list)
예제 #2
0
 def get_out_ftp_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing FTP connections.
     """
     with closing(self.session()) as session:
         return query.out_ftp_list(session, cluster_id, needs_columns)
예제 #3
0
파일: odb.py 프로젝트: bboerner/zato
 def get_out_ftp_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing FTP connections.
     """
     with closing(self.session()) as session:
         return query.out_ftp_list(session, cluster_id, needs_columns)
예제 #4
0
파일: ftp.py 프로젝트: xbx/zato
 def get_data(self, session):
     return out_ftp_list(session, self.request.input.cluster_id, False)
예제 #5
0
파일: ftp.py 프로젝트: dsuch/zato
 def get_data(self, session):
     return out_ftp_list(session, self.request.input.cluster_id, False)
예제 #6
0
파일: odb.py 프로젝트: dsuch/zato
 def get_out_ftp_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing FTP connections.
     """
     return out_ftp_list(self._session, cluster_id, needs_columns)
예제 #7
0
 def get_out_ftp_list(self, cluster_id, needs_columns=False):
     """ Returns a list of outgoing FTP connections.
     """
     return out_ftp_list(self._session, cluster_id, needs_columns)
예제 #8
0
파일: odb.py 프로젝트: brtsz/zato
    def get_out_ftp_list(self, cluster_id):
        """ Returns a list of outgoing FTP connections.
        """
        return out_ftp_list(self._session, cluster_id)

# ##############################################################################