Project

General

Profile

Download (5.68 KB) Statistics
| Branch: | Revision:

git_sitools_idoc / webstatDev / idoc_Maison / webstat / libStatSitoolsConstante.py @ 8792cad8

1 8792cad8 Marc NICOLAS
#!/usr/bin/env python
2
#-*-coding:utf-8-*-
3
4
__version__ = "0.1"
5
__license__ = "GPL"
6
__author__ = "Marc NICOLAS"
7
__credit__ = "Marc NICOLAS"
8
__maintainer__ = "Marc NICOLAS"
9
__email__ = "marc.nicolas@ias.u-psud.fr"
10
11
12
def defCst(app):
13
14
    dico_cst = {}
15
16
    dico_cst["time_format"] = "%Y-%m-%d %H:%M:%S"
17
    dico_cst["time_format_for_by_month"] = "%Y-%m-%d"
18
19
    dico_cst["pattern_Fits"] = ".fits"
20
    dico_cst["pattern_Tar"] = ".tar"
21
    dico_cst["pattern_download"] = [".fits", ".tar"]
22
    dico_cst["pattern_http_method"] = "GET"
23
    dico_cst["pattern_code_retour"] = "200"
24
    dico_cst["patternBot"] = "bot.html"
25
    dico_cst["patternYahoo"] = "http://help.yahoo.com"
26
    dico_cst["patternBaidu"] = ["baidu.com","Baiduspider", "+http://www.baidu.com/search", "spider"]
27
28
    dico_cst["CutFits"] = ["storageFitsCut", "cut", "Cut"]
29
    dico_cst["sia"] = ["sia", "SIA"]
30
31
    dico_cst["dico_max_per_cent"] = {"is_access_access_by_country": 0.005, "is_down_stat_by_project": 0.005,
32
                                     "is_down_stat_by_country": 0.005, "is_down_stat_by_ip": 0.005,
33
                                     "is_access_access_by_ip": 0.005, "is_access_access_by_country": 0.005}
34
35
    # SZ CLUSTER INSTANCE
36
    if app == "SZCLUSTER":
37
        #PATH FOR  DEV
38
        dico_cst["listPathLogs"] = {"/home/marc/log/logSZ/"}
39
        #PATH FOR PROD
40
        #dico_cst["listPathLogs"] = {"/usr/local/Sitools2_Logs/Sitools2_SZ_Cluster_DB/logs"}
41
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/SZCLUSTER_DATABASE/project-index.html"
42
        dico_cst["patternVoConeSearchToSeek"] = "/global_dataset/plugin/conesearch"
43
        dico_cst["patternVoSiaToSeek"] = ""
44
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
45
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82","129.175.65.115",
46
                                       "129.175.66.42", "127.0.0.1", "129.175.66.43", "129.175.66.248", "129.175.68.20",
47
                                       "129.175.64.25","220.181.108.118","123.125.71.31","123.125.71.31"]
48
        dico_cst["dicoProject"] ={}
49
50
        # HESIOD INSTANCE
51
    elif app == "HESIOD":
52
        # PATH FOR DEV
53
        dico_cst["listPathLogs"] = {"/home/marc/log/logH", "/home/marc/log/logH_0.9.1", "/home/marc/log/logH_1.0","/home/marc/log/logH_2.0"}
54
        #PATH FOR PROD
55
        #dico_cst["listPathLogs"]= {"/usr/local/Sitools2_Logs/Sitools2_Herschel/logs","/usr/local/Sitools2_Logs/old_Sitools2_instances/Sitools2_Herschel_old/Sitools2_Herschel_PROD_V1.0/workspace/fr.cnes.sitools.core/logs","/usr/local/Sitools2_Logs/old_Sitools2_instances/Sitools2_Herschel_old/Sitools2_Herschel_0.9.1_old/workspace/fr.cnes.sitools.core/logs"}
56
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/"
57
        dico_cst["patternVoConeSearchToSeek"] = ""
58
        dico_cst["patternVoSiaToSeek"] = "sia"
59
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
60
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82",
61
                                       "129.175.66.42",  "129.175.66.43", "129.175.66.248", "129.175.68.20",
62
                                       "129.175.64.25", "220.181.108.118"]
63
        dico_cst["dicoProject"] = {"sag-4": "SAG-4", "herschel": "Herschel", "cluster-low-z": "Cluster-Low-Z",
64
                                   "sag-3": "SAG-3", "ddt_mustdo_4": "DDT_MustDo_4", "lens_malhotra": "Lens_Malhotra",
65
                                   "ot1_atielens": "OT1_atielens", "ot2_ehabart": "OT2_ehabart", "ot1_lho": "OT1_lho",
66
                                   "ot1_mmiville": "OT1_mmiville", "sag-1": "SAG-1", "h-atlas":"H-ATLAS",
67
                                   "ot2_hdole": "Planck-High-z", "ot1_lmontier": "Planck-High-z",
68
                                   "ddt_mustdo_5": "Planck-High-z", "planck%20high-z": "Planck-High-z",
69
                                   "herschel%20private": "Herschel-Private", "herschel-private": "Herschel-Private",
70
                                   "others": "Others", "SAG-4_IAS": "SAG-4"}
71
72
        # SDO INSTANCE
73
    elif app == "SDO":
74
        dico_cst["listPathLogs"] = {"/usr/local/Sitools2_Logs/Sitools2_SDO/logs"}
75
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/SZCLUSTER_DATABASE/project-index.html"
76
        dico_cst["patternVoConeSearchToSeek"] = "/global_dataset/plugin/conesearch"
77
        dico_cst["patternVoSiaToSeek"] = ""
78
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
79
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82",
80
                                       "129.175.66.42", "127.0.0.1", "129.175.66.43", "129.175.66.248", "129.175.68.20",
81
                                       "129.175.64.25"]
82
        dico_cst["dicoProject"] ={}
83
84
        # COROT INSTANCE
85
    elif app == "COROT":
86
        dico_cst["listPathLogs"] = {"/usr/local/Sitools2_Logs/Sitools2_Corot/logs"}
87
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/SZCLUSTER_DATABASE/project-index.html"
88
        dico_cst["patternVoConeSearchToSeek"] = "/global_dataset/plugin/conesearch"
89
        dico_cst["patternVoSiaToSeek"] = ""
90
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
91
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82",
92
                                       "129.175.66.42", "127.0.0.1", "129.175.66.43", "129.175.66.248", "129.175.68.20",
93
                                       "129.175.64.25"]
94
        dico_cst["dicoProject"] ={}
95
96
        # PICARD INSTANCE
97
    return dico_cst