Example #1
0
def _get_edit_create_message(params, prefix=''):
    """ A bunch of attributes that can be used by both 'edit' and 'create' actions
    for channels and outgoing connections.
    """
    security_id = get_security_id_from_select(params, prefix)

    return {
        'is_internal': False,
        'connection': params['connection'],
        'transport': params['transport'],
        'id': params.get('id'),
        'cluster_id': params['cluster_id'],
        'name': params[prefix + 'name'],
        'is_active': bool(params.get(prefix + 'is_active')),
        'host': params.get(prefix + 'host'),
        'url_path': params[prefix + 'url_path'],
        'merge_url_params_req': bool(params.get(prefix + 'merge_url_params_req')),
        'url_params_pri': params.get(prefix + 'url_params_pri', URL_PARAMS_PRIORITY.DEFAULT),
        'params_pri': params.get(prefix + 'params_pri', PARAMS_PRIORITY.DEFAULT),
        'serialization_type': params.get(prefix + 'serialization_type', HTTP_SOAP_SERIALIZATION_TYPE.DEFAULT.id),
        'method': params.get(prefix + 'method'),
        'soap_action': params.get(prefix + 'soap_action', ''),
        'soap_version': params.get(prefix + 'soap_version', None),
        'data_format': params.get(prefix + 'data_format', None),
        'service': params.get(prefix + 'service'),
        'ping_method': params.get(prefix + 'ping_method'),
        'pool_size': params.get(prefix + 'pool_size'),
        'timeout': params.get(prefix + 'timeout'),
        'security_id': security_id,
    }
Example #2
0
def _get_edit_create_message(params, prefix=''):
    """ A bunch of attributes that can be used by both 'edit' and 'create' actions
    for channels and outgoing connections.
    """
    security_id = get_security_id_from_select(params, prefix)

    return {
        'is_internal':
        False,
        'connection':
        params['connection'],
        'transport':
        params['transport'],
        'id':
        params.get('id'),
        'cluster_id':
        params['cluster_id'],
        'name':
        params[prefix + 'name'],
        'is_active':
        bool(params.get(prefix + 'is_active')),
        'host':
        params.get(prefix + 'host'),
        'url_path':
        params[prefix + 'url_path'],
        'merge_url_params_req':
        bool(params.get(prefix + 'merge_url_params_req')),
        'url_params_pri':
        params.get(prefix + 'url_params_pri', URL_PARAMS_PRIORITY.DEFAULT),
        'params_pri':
        params.get(prefix + 'params_pri', PARAMS_PRIORITY.DEFAULT),
        'serialization_type':
        params.get(prefix + 'serialization_type',
                   HTTP_SOAP_SERIALIZATION_TYPE.DEFAULT.id),
        'method':
        params.get(prefix + 'method'),
        'soap_action':
        params.get(prefix + 'soap_action', ''),
        'soap_version':
        params.get(prefix + 'soap_version', None),
        'data_format':
        params.get(prefix + 'data_format', None),
        'service':
        params.get(prefix + 'service'),
        'ping_method':
        params.get(prefix + 'ping_method'),
        'pool_size':
        params.get(prefix + 'pool_size'),
        'timeout':
        params.get(prefix + 'timeout'),
        'sec_tls_ca_cert_id':
        params.get(prefix + 'sec_tls_ca_cert_id'),
        'security_id':
        security_id,
        'has_rbac':
        bool(params.get(prefix + 'has_rbac')),
        'content_type':
        params.get(prefix + 'content_type'),
    }
Example #3
0
 def on_after_set_input(self):
     self.input_dict['security_id'] = get_security_id_from_select(self.input, '', 'security_id')
Example #4
0
    def on_after_set_input(self):

        self.input.security_id = get_security_id_from_select(self.input, '', 'security_id')
        self.input.service_whitelist = self.input.service_whitelist.strip().splitlines()
Example #5
0
 def on_after_set_input(self):
     self.input_dict['security_id'] = get_security_id_from_select(
         self.input, '', 'security_id')
Example #6
0
def _get_edit_create_message(params, prefix=''):
    """ A bunch of attributes that can be used by both 'edit' and 'create' actions
    for channels and outgoing connections.
    """
    security_id = get_security_id_from_select(params, prefix)

    message = {
        'is_internal':
        False,
        'connection':
        params['connection'],
        'transport':
        params['transport'],
        'id':
        params.get('id'),
        'cluster_id':
        params['cluster_id'],
        'name':
        params[prefix + 'name'],
        'is_active':
        bool(params.get(prefix + 'is_active')),
        'host':
        params.get(prefix + 'host'),
        'url_path':
        params[prefix + 'url_path'],
        'merge_url_params_req':
        bool(params.get(prefix + 'merge_url_params_req')),
        'match_slash':
        bool(params.get(prefix + 'match_slash')),
        'http_accept':
        params.get(prefix + 'http_accept'),
        'url_params_pri':
        params.get(prefix + 'url_params_pri', URL_PARAMS_PRIORITY.DEFAULT),
        'params_pri':
        params.get(prefix + 'params_pri', PARAMS_PRIORITY.DEFAULT),
        'serialization_type':
        params.get(prefix + 'serialization_type',
                   HTTP_SOAP_SERIALIZATION_TYPE.DEFAULT.id),
        'method':
        params.get(prefix + 'method'),
        'soap_action':
        params.get(prefix + 'soap_action', ''),
        'soap_version':
        params.get(prefix + 'soap_version', None),
        'data_format':
        params.get(prefix + 'data_format', None),
        'service':
        params.get(prefix + 'service'),
        'ping_method':
        params.get(prefix + 'ping_method'),
        'pool_size':
        params.get(prefix + 'pool_size'),
        'timeout':
        params.get(prefix + 'timeout'),
        'sec_tls_ca_cert_id':
        params.get(prefix + 'sec_tls_ca_cert_id'),
        'security_id':
        security_id,
        'has_rbac':
        bool(params.get(prefix + 'has_rbac')),
        'content_type':
        params.get(prefix + 'content_type'),
        'cache_id':
        params.get(prefix + 'cache_id'),
        'cache_expiry':
        params.get(prefix + 'cache_expiry'),
        'content_encoding':
        params.get(prefix + 'content_encoding'),
        'hl7_version':
        params.get(prefix + 'hl7_version'),
        'json_path':
        params.get(prefix + 'json_path'),
        'data_encoding':
        params.get(prefix + 'data_encoding'),
        'is_rate_limit_active':
        params.get(prefix + 'is_rate_limit_active'),
        'rate_limit_type':
        params.get(prefix + 'rate_limit_type'),
        'rate_limit_def':
        params.get(prefix + 'rate_limit_def'),
        'rate_limit_check_parent_def':
        params.get(prefix + 'rate_limit_check_parent_def'),
        'is_audit_log_sent_active':
        params.get(prefix + 'is_audit_log_sent_active') or False,
        'is_audit_log_received_active':
        params.get(prefix + 'is_audit_log_received_active') or False,
        'max_len_messages_sent':
        params.get(prefix + 'max_len_messages_sent') or _max_len_messages,
        'max_len_messages_received':
        params.get(prefix + 'max_len_messages_received') or _max_len_messages,
        'max_bytes_per_message_sent':
        params.get(prefix + 'max_bytes_per_message_sent')
        or _max_data_stored_per_message,
        'max_bytes_per_message_received':
        params.get(prefix + 'max_bytes_per_message_received')
        or _max_data_stored_per_message,
    }

    return message