# $SnapHashLicense:
#
# SnapLogic - Open source data services
#
# Copyright (C) 2009, SnapLogic, Inc. All rights reserved.
#
# See http://www.snaplogic.org for more information about
# the SnapLogic project.
#
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LEGAL file
# at the top of the source tree.
#
# "SnapLogic" is a trademark of SnapLogic, Inc.
#
#
# $
#$Id: keys.py 10295 2009-12-22 23:27:28Z dhiraj $
# General keys
GUID = 'guid'
""" GUID of a resource."""
GEN_ID = 'gen_id'
"""Generation ID of a resource (starting with 0)."""
URI = 'uri'
"""URI."""
SUMMARY = 'summary'
RESDEF = 'resdef'
ERROR = 'error'
SUCCESS = 'success'
SUMMARY = 'summary'
KNOWN = 'KNOWN'
UNKNOWN = 'UNKNOWN'
RESOURCE_CATEGORY = 'resource_category'
CATEGORIES_ALLOWED = "categories_allowed"
RESOURCE_REF = 'resource_reference'
# Capabilities
CAPABILITIES = 'capabilities'
CAPABILITY_PREVIEW = 'preview'
CAPABILITY_CREATE_RESOURCE_TEMPLATE = 'create_resource_template'
CAPABILITY_SUGGEST_RESOURCE_VALUES = 'suggest_resource_values'
CAPABILITY_VALIDATE = 'validate'
CAPABILITY_UPGRADE = 'upgrade'
CAPABILITY_INPUT_VIEW_LOWER_LIMIT = 'input_view_lower_limit'
CAPABILITY_INPUT_VIEW_UPPER_LIMIT = 'input_view_upper_limit'
CAPABILITY_INPUT_VIEW_ALLOW_BINARY = 'input_view_allow_binary'
CAPABILITY_OUTPUT_VIEW_LOWER_LIMIT = 'output_view_lower_limit'
CAPABILITY_OUTPUT_VIEW_UPPER_LIMIT = 'output_view_upper_limit'
CAPABILITY_OUTPUT_VIEW_ALLOW_BINARY = 'output_view_allow_binary'
CAPABILITY_ALLOW_PASS_THROUGH = 'allow_pass_through'
# A list of Capabilities that are URIs
CAPABILITY_URIS = [CAPABILITY_CREATE_RESOURCE_TEMPLATE,
CAPABILITY_SUGGEST_RESOURCE_VALUES,
CAPABILITY_VALIDATE,
CAPABILITY_UPGRADE]
# Constraints
CONSTRAINT_OBFUSCATE = 'obfuscate'
# Constraints: LOV dynamic constraint values
CONSTRAINT_LOV_INPUT_FIELD = '$#!__snap__.input_field!#$'
CONSTRAINT_LOV_OUTPUT_FIELD = '$#!__snap__.output_field!#$'
CONSTRAINT_LOV_INPUT_VIEW = '$#!__snap__.input_view!#$'
CONSTRAINT_LOV_OUTPUT_VIEW = '$#!__snap__.output_view!#$'
CONSTRAINT_LOV_DYNAMIC_VALUES = (CONSTRAINT_LOV_INPUT_FIELD,
CONSTRAINT_LOV_OUTPUT_FIELD,
CONSTRAINT_LOV_INPUT_VIEW,
CONSTRAINT_LOV_OUTPUT_VIEW)
# Keys appearing in different contexts with similar semantics.
LABEL = 'label'
DESCRIPTION = 'description'
VALUE = 'value'
NAME = 'name'
OVERVIEW = 'overview'
COMPONENT_NAME = 'component_name'
COMPONENT_VERSION = 'component_version'
COMPONENT_DOC_URI = "component_doc_uri"
DEFAULT_VALUE = 'default_value'
MODIFIABLE = 'modifiable'
ERROR = 'error'
LIST_ERROR = 'list_error'
DICT_ERROR = 'dict_error'
ERROR_MESSAGE = 'error_message'
# Property-related
PROPERTIES = 'properties'
PROPERTY_DEFS = 'prop_definitions'
PROPERTY_VALS = 'prop_values'
PROPERTY_DEFINITION = 'definition'
REQUIRED = 'required'
FIXED_KEYS = "fixed_keys"
SIMPLE_PROPERTY_CONSTRAINT = 'constraint'
PROPERTY_TYPE = 'type'
SNAP_GENERAL_INFO = 'snap_general_info'
SNAP_INTERNAL = 'snap_internal'
PRIMARY_FUNCTION = 'primary_function'
'''A key meant to be used in SNAP_INTERNAL dictionary. '''
AUTHOR = 'author'
PARAMS = 'params'
# Pipeline-related
PIPELINE_PARAM_MAP = 'parammap'
PIPELINE_RESOURCES = 'resources'
RESOURCE_NAME = 'resource_name'
RESOURCE_VIEW_NAME = 'resource_view_name'
VIEW_LINKS = 'view_links'
COMPOSITE_PROPERTY_DEFAULT_ENTRY_TYPE = 'default_entry_type'
COMPOSITE_PROPERTY_MIN_SIZE = 'min_size'
COMPOSITE_PROPERTY_MAX_SIZE = 'max_size'
COMPOSITE_PROPERTY_STRUCT = 'struct'
ORIGINAL_OUTPUT_FIELDS = 'original_output_fields'
INPUT_VIEW_ASSIGNMENT = 'input_assignment'
OUTPUT_VIEW_ASSIGNMENT = 'output_assignment'
RENAMED_FIELDS_MAP = 'renamed_fields_map'
OVERRIDDEN_VALUE = 'overridden_value'
# View-related
INPUT_VIEWS = 'input_views'
PT_INPUT_VIEWS = 'input_views'
OUTPUT_VIEWS = 'output_views'
# If only one view is allowed it is index 0
SINGLE_VIEW = 0
VIEW_IS_RECORD = 'is_record'
VIEW_CONTENT_TYPES = 'view_content_types'
INPUT_VIEW_IS_PASSTHROUGH = 'is_pass_through'
OUTPUT_VIEW_PASSTHROUGH = 'pass_through'
VIEW_FIELDS = 'fields'
FIELD_NAME = 0
FIELD_TYPE = 1
FIELD_DESC = 2
STATISTICS_RECORD_COUNT = 'record_count'
STATISTICS_BYTE_COUNT = 'byte_count'
# Exec related
CREATE_STREAM = 'create_stream'
CONTENT_TYPE = 'Content-Type'
RUNTIME_URI = 'runtime_uri'
"""Deprecated"""
RUNTIME_STATUS_URI = 'runtime_status_uri'
RUNTIME_CONTROL_URI = 'runtime_control_uri'
RUNTIME_ID = 'rid'
STREAM = 'stream'
# Other constants
PIPELINE_COMPONENT_NAME = "snaplogic.components.Pipeline"
# Server URIs
SERVER_COMPONENT_LIST = 'server_component_list'
SERVER_CONFIG_INFO = 'server_config_information'
SERVER_INFO = 'server_information'
SERVER_STATS = 'server_stats'
SERVER_LOGFILES = 'server_logfile'
PIPELINE_LOGFILE = 'pipeline'
SERVER_RESOURCE_LIST = 'server_resource_list'
SERVER_RESOURCE_SUMMARY = 'server_resource_summary'
SERVER_RESOURCE_UPGRADE = 'server_resource_upgrade'
SERVER_RESOURCE_READ = 'server_resource_read'
RESOURCE_DIFF = 'resource_diff'
SERVER_RUNTIME_INFO = 'server_runtime_info'
SERVER_RUNTIME_STATUS = 'server_runtime_status'
SERVER_PIPELINE_TEMPLATE = 'pipeline_template'
SERVER_PIPELINE_SUGGEST = 'pipeline_suggest'
SERVER_PIPELINE_VALIDATE = 'pipeline_validate'
SERVER_AUTH = 'auth'
SERVER_AUTH_KEY_PREFIX = SERVER_AUTH + "_"
# We have a unique prefix to the keys, since the actual names of the
# keys are quite common words, and we want to avoid the risk of having
# a name collision.
SERVER_AUTH_CHECK = SERVER_AUTH_KEY_PREFIX + 'check'
SERVER_AUTH_USER_LIST = SERVER_AUTH_KEY_PREFIX + 'user_list'
SERVER_AUTH_USER_ENTRY = SERVER_AUTH_KEY_PREFIX + 'user_entry'
SERVER_AUTH_GROUP_LIST = SERVER_AUTH_KEY_PREFIX + 'group_list'
SERVER_AUTH_GROUP_ENTRY = SERVER_AUTH_KEY_PREFIX + 'group_entry'
SERVER_AUTH_ACL_LIST = SERVER_AUTH_KEY_PREFIX + 'acl_list'
SERVER_AUTH_ACL_ENTRY = SERVER_AUTH_KEY_PREFIX + 'acl_entry'
SERVER_SCHEDULER = 'server_scheduler'
SERVER_NOTIFICATION = 'server_notification'
# Resource property suffixes
RESOURCE_PROPERTY_NAMESPACE = '/__snap__'
RESOURCE_PROPERTY_DEPENDENCIES = RESOURCE_PROPERTY_NAMESPACE + '/dependencies'
RESOURCE_PROPERTY_DEPENDENCIES_LOCAL = RESOURCE_PROPERTY_DEPENDENCIES + '/local'
# Cousins
RELATED_PIPELINES = 'related_pipelines'
RELATED_MAPPING_SOURCE_FIELD = 'source_field'
RELATED_MAPPING_TARGET_PARAM = 'target_param'
# CC related
CC_TOKEN = "cc_token"
CC_NAME = "cc_name"
# Repository related
FORCE = "force"
# Resource diff keys
DICT_DIFF = 'dict_diff'
LIST_DIFF = 'list_diff'
DIFF_INFO = 'diff_info'
DIFF_MESSAGE = 'message'
DIFF_PROMPT = 'prompt'
|