summaryrefslogtreecommitdiffstats
path: root/Src/PyCatcher/src/rules.py
blob: 8575766649aa28c9cc8181eaef192cda7ee76bd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import pyCatcherModel
from settings import Provider_list, Provider_Country_list

class RuleResult:
    OK = 'Ok'
    WARNING = 'Warning'
    CRITICAL = 'Critical'

class Rule:

    is_active = False
    identifier = 'Rule'

    def check(self, arfcn, base_station_list):
        return RuleResult.CRITICAL

class ProviderRule (Rule):

    identifier = 'Provider Check'

    def check(self, arfcn, base_station_list):
        result = RuleResult.CRITICAL
        for station in base_station_list:
            if station.arfcn == arfcn:
                if station.provider in Provider_list:
                    result = RuleResult.OK
                    break
        return result

class CountryProvider (Rule):
    pass

class BSICIntegrity (Rule):
    pass

class Uniqueness (Rule):
    pass

class NeighbourhoodStructure (Rule):
    pass

class LACIntegrity (Rule):
    pass

class CellIDDatabase (Rule):
    pass

class MachineLearning (Rule):
    pass