|
|
|
@ -25,148 +25,148 @@ import sys
|
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
setLocalTranslate('cl_api',sys.modules[__name__])
|
|
|
|
|
setLocalTranslate('cl_core',sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClApiMonitorPeriod(Variable):
|
|
|
|
|
class VariableClCoreMonitorPeriod(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store period monitoring session
|
|
|
|
|
"""
|
|
|
|
|
type = "int"
|
|
|
|
|
value = "30"
|
|
|
|
|
|
|
|
|
|
class VariableClApiSidLive(Variable):
|
|
|
|
|
class VariableClCoreSidLive(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store time session live
|
|
|
|
|
"""
|
|
|
|
|
type = "int"
|
|
|
|
|
value = "1440"
|
|
|
|
|
|
|
|
|
|
class VariableClApiRights(Variable):
|
|
|
|
|
class VariableClCoreRights(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store path to file with rights
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"conf/right.conf")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"conf/right.conf")
|
|
|
|
|
|
|
|
|
|
class VariableClApiGroupRights(Variable):
|
|
|
|
|
class VariableClCoreGroupRights(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store path to file with group rights
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"conf/group_right.conf")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"conf/group_right.conf")
|
|
|
|
|
|
|
|
|
|
class VariableClApiData(Variable):
|
|
|
|
|
class VariableClCoreData(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store path to data files
|
|
|
|
|
"""
|
|
|
|
|
value = '/var/calculate/server'
|
|
|
|
|
|
|
|
|
|
class VariableClApiDatabase(Variable):
|
|
|
|
|
class VariableClCoreDatabase(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store name files containing clients certificates
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"client_certs/Database")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"client_certs/Database")
|
|
|
|
|
|
|
|
|
|
class VariableClApiServDatabase(Variable):
|
|
|
|
|
class VariableClCoreServDatabase(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store name files containing signed servers certificates
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"server_certs/Database")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"server_certs/Database")
|
|
|
|
|
|
|
|
|
|
class VariableClApiSidsPath(Variable):
|
|
|
|
|
class VariableClCoreSidsPath(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store path to sessions id files
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"sids")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"sids")
|
|
|
|
|
|
|
|
|
|
class VariableClApiPidsPath(Variable):
|
|
|
|
|
class VariableClCorePidsPath(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store path to process id files
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"pids")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"pids")
|
|
|
|
|
|
|
|
|
|
class VariableClApiSidsFile(Variable):
|
|
|
|
|
class VariableClCoreSidsFile(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store name sessions database files
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"sid.db")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"sid.db")
|
|
|
|
|
|
|
|
|
|
class VariableClApiPidsFile(Variable):
|
|
|
|
|
class VariableClCorePidsFile(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store name process id database files
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"pid.db")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"pid.db")
|
|
|
|
|
|
|
|
|
|
class VariableClApiSidsPids(Variable):
|
|
|
|
|
class VariableClCoreSidsPids(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store name file comparison sessions and process
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"sid_pid")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"sid_pid")
|
|
|
|
|
|
|
|
|
|
class VariableClApiMaxSid(Variable):
|
|
|
|
|
class VariableClCoreMaxSid(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store maximum session id
|
|
|
|
|
"""
|
|
|
|
|
value = "10000"
|
|
|
|
|
|
|
|
|
|
class VariableClApiMaxPid(Variable):
|
|
|
|
|
class VariableClCoreMaxPid(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Variable store maximum process id
|
|
|
|
|
"""
|
|
|
|
|
value = "100000"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClApiCert(Variable):
|
|
|
|
|
class VariableClCoreCert(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Server certificate
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_cert_path'),"server.crt")
|
|
|
|
|
return path.join(self.Get('cl_core_cert_path'),"server.crt")
|
|
|
|
|
|
|
|
|
|
class VariableClApiCertPath(Variable):
|
|
|
|
|
class VariableClCoreCertPath(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Server certificate path
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_data'),"ca")
|
|
|
|
|
return path.join(self.Get('cl_core_data'),"ca")
|
|
|
|
|
|
|
|
|
|
class VariableClApiKey(Variable):
|
|
|
|
|
class VariableClCoreKey(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Private server key
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_cert_path'),"server.key")
|
|
|
|
|
return path.join(self.Get('cl_core_cert_path'),"server.key")
|
|
|
|
|
|
|
|
|
|
class VariableClApiSidLive(Variable):
|
|
|
|
|
class VariableClCoreSidLive(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Max time live sessions (in minutes)
|
|
|
|
|
"""
|
|
|
|
|
type = "int"
|
|
|
|
|
value = "1440"
|
|
|
|
|
|
|
|
|
|
class VariableClApiCertLive(Variable):
|
|
|
|
|
class VariableClCoreCertLive(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Max time live sessions (in minutes)
|
|
|
|
|
"""
|
|
|
|
|
type = "int"
|
|
|
|
|
value = "1576800"
|
|
|
|
|
|
|
|
|
|
class VariableClApiClientActivePeriod(Variable):
|
|
|
|
|
class VariableClCoreClientActivePeriod(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Period client activity (in seconds)
|
|
|
|
|
"""
|
|
|
|
|
type = "int"
|
|
|
|
|
value = "15"
|
|
|
|
|
|
|
|
|
|
class VariableClApiGetFramePeriod(Variable):
|
|
|
|
|
class VariableClCoreGetFramePeriod(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Period request frames (in seconds)
|
|
|
|
|
"""
|
|
|
|
@ -191,4 +191,4 @@ class VariableClGlobRootCert(Variable):
|
|
|
|
|
Trusted certificates installed in system
|
|
|
|
|
"""
|
|
|
|
|
def get(self):
|
|
|
|
|
return path.join(self.Get('cl_api_cert_path'),"sys_ca.crt")
|
|
|
|
|
return path.join(self.Get('cl_core_cert_path'),"sys_ca.crt")
|