This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathor_class.py
64 lines (46 loc) · 1.93 KB
/
or_class.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#OBJECT definers
#Defining controller
class Controller(object):
#defaultvalue
controllername_id = ""
logging = ""
condition= ""
expected_value = ""
ifsatisfied_action_action = "nop"
on_ifnotsatisfied_action_action = "nop"
rearm_after = 0
rearm_action = "nop"
def __init__(self,controllername_id,condition, expected_value,ifsatisfied_action,ifnotsatisfied_action,repeat_ifsatisfied_action,repeat_ifnotsatisfied_action,rearm_after,rearm_action,totalprobes,index,lastresult):
self.controllername_id = controllername_id
self.condition = condition
self.expected_value = expected_value
self.ifsatisfied_action = ifsatisfied_action
self.ifnotsatisfied_action = ifnotsatisfied_action
self.repeat_ifsatisfied_action = repeat_ifsatisfied_action
self.repeat_ifnotsatisfied_action = repeat_ifnotsatisfied_action
self.rearm_after = rearm_after
self.rearm_action = rearm_action
self.totalprobes = totalprobes
self.index = index
self.lastresult = lastresult
class Probe(object):
probename_id = ""
sql = ""
def __init__(self,probename_id,sql,sqlengine,probefile,controllerindex,probeindex,abs_probeindex,lastresult):
self.probename_id = probename_id
self.sql = sql
self.sqlengine = sqlengine
self.probefile = probefile
self.controllerindex = controllerindex
self.probeindex = probeindex
self.abs_probeindex = abs_probeindex
self.lastresult = lastresult
class Dbengine(object):
def __init__(self,database_id,dbengine,host,database,username,password,dbindex):
self.database_id = database_id
self.dbengine = dbengine
self.host = host
self.database = database
self.username = username
self.password = password
self.dbindex = dbindex