summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/12-09-2011/trueTableClass.py
blob: d040fb06d211237a7c7bc87c88bf261e5f787d85 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178



class trueTable:
     def __init__(self, resultsList):

		self.resultsList	= resultsList
		self.nanoBTS1		= None
		self.nanoBTS2		= None
		self.nanoBTS3		= None
		self.o2Card		= None
		self.eplusCard		= None
		self.vodaCard		= None
		self.tmobileCard	= None
		self.outgoingLandline	= None
		self.asteriskServer 	= None

     def initTrueTable(self):


    	for x in self.resultsList:

        	destination = x[1]
        	result = x[2]
		caller = x[0]

        	if destination == 'GSMRZ1': 
                	if result =='486':
		    		self.nanoBTS1 = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMRZ1':
						if result == '200':
							self.nanoBTS1 = True

					if destination == 'GSMRZ1':
						if result == '200':
							self.nanoBTS1 = True
                	elif result =='200':
				self.nanoBTS1 = True

        	elif destination == 'GSMRZ2': 
                	if result =='486':
		    		self.nanoBTS2 = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMRZ2':
						if result == '200':
							self.nanoBTS2 = True

					if destination == 'GSMRZ2':
						if result == '200':
							self.nanoBTS2 = True
                	elif result =='200':
				self.nanoBTS2 = True

        	elif destination == 'GSMRZ3': 
                	if result =='486':
		    		self.nanoBTS3 = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMRZ3':
						if result == '200':
							self.nanoBTS3 = True

					if destination == 'GSMRZ2':
						if result == '200':
							self.nanoBTS3 = True
                	elif result =='200':
				self.nanoBTS3 = True

       		elif destination == 'GSMExt.O2': 
                	if result =='486':
		    		self.o2Card = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMExt.O2':
						if result == '200':
							self.o2Card = True

					if destination == 'GSMExt.O2':
						if result == '200':
							self.o2Card = True
                	elif result =='200':
				self.o2Card = True

        	elif destination == 'GSMExt.Voda': 
                	if result =='486':
		    		self.vodaCard = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMExt.Voda':
						if result == '200':
							self.vodaCard = True

					if destination == 'GSMExt.Voda':
						if result == '200':
							self.vodaCard = True
                	elif result =='200':
				self.vodaCard = True

        	elif destination == 'GSMExt.Eplus': 
                	if result =='486':
		    		self.eplusCard = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMExt.Eplus':
						if result == '200':
							self.eplusCard = True

					if destination == 'GSMExt.Eplus':
						if result == '200':
							self.eplusCard = True
                	elif result =='200':
				self.eplusCard = True

        	elif destination == 'GSMExt.Tm': 
                	if result =='486':
		    		self.tmobileCard = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'GSMExt.Tm':
						if result == '200':
							self.tmobileCard = True

					if destination == 'GSMExt.Tm':
						if result == '200':
							self.tmobileCard = True
                	elif result =='200':
				self.tmobileCard = True

        	elif destination == 'sip': 
                	if result =='486':
		    		self.asteriskServer = False
                    		for y in self.resultsList:
                    			call = y[0]
					destination = y[1]
                    			result = y[2]
                    			if call == 'sip':
						if result == '200':
							self.asteriskServer = True

					if destination == 'sip':
						if result == '200':
							self.asteriskServer = True
            
                	elif result =='200':
				self.asteriskServer = True

		if caller == 'GSMRZ1' or caller == 'GSMRZ2' or caller == 'GSMRZ3':

        		if destination == 'landline': 
                		if result =='486':
		    			self.outgoingLandline = False
                    			for y in self.resultsList:
                    				call = y[0]
						destination = y[1]
                    				result = y[2]
                    				if caller == 'GSMRZ1' or caller == 'GSMRZ2' or caller == 'GSMRZ3':
							if destination == 'landline':
								if result == '200':
									self.outgoingLandline = True