Exemplo n.º 1
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)
        add_select(self, 'rate_limit_type', RATE_LIMIT.TYPE(), needs_initial_select=False)
Exemplo n.º 2
0
    def __init__(self, security_list=None, storage_class_list=None, prefix=None, post_data=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)
        add_security_select(self, security_list, False, 'security_id')

        self.fields['storage_class'].choices = []
        for name in CLOUD.AWS.S3.STORAGE_CLASS:
            self.fields['storage_class'].choices.append([name, name])
Exemplo n.º 3
0
 def __init__(self,
              security_list=[],
              prefix=None,
              post_data=None,
              req=None):
     super(CreateForm, self).__init__(post_data, prefix=prefix)
     add_security_select(self, security_list, field_name='security_id')
Exemplo n.º 4
0
    def __init__(self,
                 security_list=[],
                 soap_versions=SOAP_VERSIONS,
                 prefix=None,
                 post_data=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['ping_method'].initial = DEFAULT_HTTP_PING_METHOD
        self.fields['pool_size'].initial = DEFAULT_HTTP_POOL_SIZE

        add_security_select(self, security_list)
Exemplo n.º 5
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)
Exemplo n.º 6
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)
Exemplo n.º 7
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)
Exemplo n.º 8
0
    def __init__(self, req, data_list, prefix=None, post_data=None):
        super(CreateForm, self).__init__(post_data, prefix=prefix)

        self.fields['role'].choices = []
        self.fields['ws_channel_id'].choices = []

        add_security_select(self, data_list.security_list, field_name='security_id', needs_no_security=False, needs_rbac=False)
        add_select(self, 'service_id', data_list.service_list)
        add_select(self, 'ws_channel_id', data_list.ws_channel_list)
        add_select(self, 'role', PUBSUB.ROLE)
        add_select(self, 'endpoint_type', PUBSUB.ENDPOINT_TYPE, needs_initial_select=False, skip=skip_endpoint_types)

        # Let's assume the default type of pub/sub endpoint will be REST clients
        self.initial['endpoint_type'] = PUBSUB.ENDPOINT_TYPE.WEB_SOCKETS.id
Exemplo n.º 9
0
Arquivo: rest.py Projeto: 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)