from zato.common.broker_message import ZMQ_SOCKET from zato.common.log_message import RID_LENGTH logger = logging.getLogger(__name__) TRACE1 = 6 logging.addLevelName(TRACE1, "TRACE1") _repr_template = Template("<$class_name at $mem_loc$attrs>") ################################################################################ security_def_type = Bunch() security_def_type.basic_auth = 'basic_auth' security_def_type.tech_account = 'tech_acc' security_def_type.wss_username_password = '******' ################################################################################ def absolutize_path(base, path): """ Turns a path into an absolute path if it's relative to the base location. If the path is already an absolute path, it is returned as-is. """ if isabs(path): return path return abspath(join(base, path)) def current_host(): return gethostname() + '/' + getfqdn()