def __init__(self, req, data_list, *args, **kwargs): super(CreateForm, self).__init__(*args, **kwargs) add_select(self, 'endpoint_type', PUBSUB.ENDPOINT_TYPE(), needs_initial_select=False, skip=skip_endpoint_types) add_select(self, 'service_id', data_list.service_list) add_select(self, 'out_amqp_id', data_list.out_amqp_list) add_select(self, 'active_status', PUBSUB.QUEUE_ACTIVE_STATUS()) add_select(self, 'delivery_method', PUBSUB.DELIVERY_METHOD()) add_select(self, 'delivery_data_format', PUBSUB.DATA_FORMAT()) add_http_soap_select(self, 'out_rest_http_soap_id', req, CONNECTION.OUTGOING, URL_TYPE.PLAIN_HTTP) add_http_soap_select(self, 'out_soap_http_soap_id', req, CONNECTION.OUTGOING, URL_TYPE.SOAP) add_select_from_service(self, req, 'zato.server.get-list', 'server_id') self.initial['endpoint_type'] = PUBSUB.ENDPOINT_TYPE.REST.id self.initial[ 'delivery_batch_size'] = PUBSUB.DEFAULT.DELIVERY_BATCH_SIZE self.initial['delivery_max_retry'] = PUBSUB.DEFAULT.DELIVERY_MAX_RETRY self.initial['wait_sock_err'] = PUBSUB.DEFAULT.WAIT_TIME_SOCKET_ERROR self.initial[ 'wait_non_sock_err'] = PUBSUB.DEFAULT.WAIT_TIME_NON_SOCKET_ERROR self.initial['out_http_method'] = 'POST'
def __init__(self, prefix=None, post_data=None, req=None): super(CreateForm, self).__init__(post_data, prefix=prefix) add_select(self, 'source_type', _source_type) add_services(self, req) add_topics(self, req, by_id=False) add_http_soap_select(self, 'outconn_rest_list', req, CONNECTION.OUTGOING, URL_TYPE.PLAIN_HTTP) add_select_from_service(self, req, 'zato.outgoing.ftp.get-list', 'ftp_source_id') add_select_from_service(self, req, 'zato.generic.connection.get-list', 'sftp_source_id', service_extra={'type_':_sftp}) add_select_from_service(self, req, 'zato.scheduler.job.get-list', 'scheduler_job_id', service_extra={ 'service_name': FILE_TRANSFER.SCHEDULER_SERVICE })