def handle(self, *args, **kwargs): params = _get_params(kwargs.get('payload'), ['cluster_id', 'connection', 'transport'], 'data.') with closing(self.server.odb.session()) as session: item_list = Element('item_list') db_items = http_soap_list(session, params['cluster_id'], params['connection'], params['transport']) 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.is_internal = db_item.is_internal item.url_path = db_item.url_path item.method = db_item.method item.soap_action = db_item.soap_action item.soap_version = db_item.soap_version item.service_id = db_item.service_id item.service_name = db_item.service_name item.security_id = db_item.security_id item.security_name = db_item.security_name item.security_def_type = db_item.security_def_type item_list.append(item) return ZATO_OK, etree.tostring(item_list)
def get_http_soap_list(self, cluster_id, connection=None, transport=None, needs_columns=False): """ Returns the list of all HTTP/SOAP channels. """ return http_soap_list(self._session, cluster_id, connection, transport, needs_columns)
def get_http_soap_list(self, cluster_id, connection=None, transport=None, needs_columns=False): """ Returns the list of all HTTP/SOAP connections. """ item_list = http_soap_list(self._session, cluster_id, connection, transport, needs_columns) if connection == 'channel': for item in item_list: item.replace_patterns_elem_path = [elem.pattern.name for elem in self._session.query(HTTPSOAP).\ filter(HTTPSOAP.id == item.id).one().replace_patterns_elem_path] item.replace_patterns_xpath = [elem.pattern.name for elem in self._session.query(HTTPSOAP).\ filter(HTTPSOAP.id == item.id).one().replace_patterns_xpath] return item_list
def get_http_soap_list(self, cluster_id, connection=None, transport=None, needs_columns=False): """ Returns the list of all HTTP/SOAP connections. """ with closing(self.session()) as session: item_list = query.http_soap_list(session, cluster_id, connection, transport, True, needs_columns) if connection == 'channel': for item in item_list: item.replace_patterns_json_pointer = [elem.pattern.name for elem in session.query(HTTPSOAP).\ filter(HTTPSOAP.id == item.id).one().replace_patterns_json_pointer] item.replace_patterns_xpath = [elem.pattern.name for elem in session.query(HTTPSOAP).\ filter(HTTPSOAP.id == item.id).one().replace_patterns_xpath] return item_list
def get_data(self, session): return http_soap_list( session, self.request.input.cluster_id, self.request.input.connection, self.request.input.transport, asbool(self.server.fs_server_config.misc.return_internal_objects), False)
def get_data(self, session): return http_soap_list(session, self.request.input.cluster_id, self.request.input.connection, self.request.input.transport, False)
def get_data(self, session): return http_soap_list(session, self.request.input.cluster_id, self.request.input.connection, self.request.input.transport, asbool(self.server.fs_server_config.misc.return_internal_objects), False)