Ejemplo n.º 1
0
    def __init__(self, security_list=[], sec_tls_ca_cert_list={}, soap_versions=SOAP_VERSIONS,
            prefix=None, post_data=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['url_params_pri'].choices = []
        for value, label in url_params_priority:
            self.fields['url_params_pri'].choices.append([value, label])

        self.fields['params_pri'].choices = []
        for value, label in params_priority:
            self.fields['params_pri'].choices.append([value, label])

        self.fields['serialization_type'].choices = []
        for item in HTTP_SOAP_SERIALIZATION_TYPE:
            self.fields['serialization_type'].choices.append([item.id, item.name])

        self.fields['soap_version'].choices = []
        for name in sorted(soap_versions):
            self.fields['soap_version'].choices.append([name, name])

        self.fields['sec_tls_ca_cert_id'].choices = []
        self.fields['sec_tls_ca_cert_id'].choices.append(INITIAL_CHOICES)
        self.fields['sec_tls_ca_cert_id'].choices.append([ZATO_NONE, 'Skip validation'])

        for value, label in sec_tls_ca_cert_list.items():
            self.fields['sec_tls_ca_cert_id'].choices.append([value, label])

        self.fields['ping_method'].initial = DEFAULT_HTTP_PING_METHOD
        self.fields['pool_size'].initial = DEFAULT_HTTP_POOL_SIZE

        add_security_select(self, security_list)
        add_services(self, req)
Ejemplo n.º 2
0
    def __init__(self, def_list=None, prefix=None, post_data=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['def_id'].choices = []
        for item in def_list:
            self.fields['def_id'].choices.append([item.id, item.name])

        add_services(self, req)
Ejemplo n.º 3
0
    def __init__(self, prefix=None, post_data=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)
        
        self.fields['socket_type'].choices = []
        for name in sorted(ZMQ_CHANNEL_TYPES):
            self.fields['socket_type'].choices.append([name, name])

        add_services(self, req)
Ejemplo n.º 4
0
    def __init__(self, prefix=None, post_data=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self._add_field('socket_type', ZMQ.CHANNEL)
        self._add_field('socket_method', ZMQ.METHOD)
        self._add_field('pool_strategy', ZMQ.POOL_STRATEGY)
        self._add_field('service_source', ZMQ.SERVICE_SOURCE)

        add_services(self, req)
Ejemplo n.º 5
0
    def __init__(self, prefix=None, post_data=None, sql_defs=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['def_id'].choices[:] = []
        self.fields['def_id'].choices.append(INITIAL_CHOICES)

        for item in sql_defs:
            self.fields['def_id'].choices.append([item.id, item.name])

        add_services(self, req)
Ejemplo n.º 6
0
    def __init__(self, req, prefix=None, *args, **kwargs):
        super(CreateForm, self).__init__(prefix=prefix, *args, **kwargs)

        add_services(self, req, True)
        add_initial_select(self, 'default_auth_method')

        for item in vault_methods:
            self.fields['default_auth_method'].choices.append([item.id, item.name])

        add_select_from_service(self, req, 'zato.security.tls.key-cert.get-list', 'tls_key_cert_id')
        add_select_from_service(self, req, 'zato.security.tls.ca-cert.get-list', 'tls_ca_cert_id')
Ejemplo n.º 7
0
 def __init__(self,
              security_list=None,
              prefix=None,
              post_data=None,
              req=None):
     super(CreateForm, self).__init__(post_data, prefix=prefix)
     add_services(self, req, by_id=False)
     add_security_select(self,
                         security_list,
                         field_name='security_def',
                         needs_rbac=False)
Ejemplo n.º 8
0
    def __init__(self, security_list=[], prefix=None, post_data=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['token_format'].choices = []
        self.fields['token_format'].choices.append(INITIAL_CHOICES)

        for name in sorted(dir(SIMPLE_IO.FORMAT)):
            if name.upper() == name:
                self.fields['token_format'].choices.append([name.lower(), name])

        add_security_select(self, security_list, field_name='security_id', needs_no_security=True, needs_rbac=False)
        add_services(self, req)
Ejemplo n.º 9
0
Archivo: rest.py Proyecto: danlg/zato
    def __init__(self,
                 security_list=[],
                 prefix=None,
                 post_data=None,
                 req=None):
        super(WithAuditLog, self).__init__(post_data, prefix=prefix)

        add_security_select(self,
                            security_list,
                            field_name='security_id',
                            needs_rbac=False)
        add_select(self,
                   'hl7_version',
                   HL7.Const.Version(),
                   needs_initial_select=False)
        add_services(self, req)
Ejemplo n.º 10
0
 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_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})
Ejemplo n.º 11
0
    def __init__(self,
                 security_list=[],
                 sec_tls_ca_cert_list={},
                 cache_list=[],
                 soap_versions=SOAP_VERSIONS,
                 prefix=None,
                 post_data=None,
                 req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['url_params_pri'].choices = []
        for value, label in url_params_priority:
            self.fields['url_params_pri'].choices.append([value, label])

        self.fields['params_pri'].choices = []
        for value, label in params_priority:
            self.fields['params_pri'].choices.append([value, label])

        self.fields['serialization_type'].choices = []
        for item in HTTP_SOAP_SERIALIZATION_TYPE:
            self.fields['serialization_type'].choices.append(
                [item.id, item.name])

        self.fields['soap_version'].choices = []
        for name in sorted(soap_versions):
            self.fields['soap_version'].choices.append([name, name])

        self.fields['sec_tls_ca_cert_id'].choices = []
        self.fields['sec_tls_ca_cert_id'].choices.append(INITIAL_CHOICES)
        self.fields['sec_tls_ca_cert_id'].choices.append(
            [ZATO_NONE, 'Skip validation'])

        for value, label in sec_tls_ca_cert_list.items():
            self.fields['sec_tls_ca_cert_id'].choices.append([value, label])

        self.fields['ping_method'].initial = DEFAULT_HTTP_PING_METHOD
        self.fields['pool_size'].initial = DEFAULT_HTTP_POOL_SIZE

        add_security_select(self, security_list)
        add_services(self, req)
        add_select(self, 'cache_id', cache_list)
Ejemplo n.º 12
0
 def __init__(self, prefix=None, post_data=None, req=None):
     super(CreateForm, self).__init__(post_data, prefix=prefix)
     self.fields['def_id'].choices = []
     add_services(self, req)
Ejemplo n.º 13
0
Archivo: sql.py Proyecto: danlg/zato
    def __init__(self, prefix=None, post_data=None, sql_defs=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)
        self.fields['def_id'].choices = ((item.id, item.name)
                                         for item in sql_defs)

        add_services(self, req)
Ejemplo n.º 14
0
 def __init__(self, prefix=None, post_data=None, req=None):
     super(CreateForm, self).__init__(post_data, prefix=prefix)
     self.fields['def_id'].choices = []
     add_services(self, req)
Ejemplo n.º 15
0
 def __init__(self, prefix, req):
     super(_Base, self).__init__(prefix=prefix)
     add_services(self, req)
Ejemplo n.º 16
0
    def __init__(self, prefix=None, post_data=None, sql_defs=None, req=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)
        self.fields['def_id'].choices = ((item.id, item.name) for item in sql_defs)

        add_services(self, req)
Ejemplo n.º 17
0
 def __init__(self, prefix, req):
     super(_Base, self).__init__(prefix=prefix)
     add_services(self, req)