From b42ef6d7bc5b8974e0b88d96170be58a186b652b Mon Sep 17 00:00:00 2001 From: Refik Hadzialic Date: Sun, 11 Sep 2011 20:52:46 +0200 Subject: first working test website connected to the testing software! --- notFinishedCode/tricode/trueTableClass.py | 198 ++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100755 notFinishedCode/tricode/trueTableClass.py (limited to 'notFinishedCode/tricode/trueTableClass.py') diff --git a/notFinishedCode/tricode/trueTableClass.py b/notFinishedCode/tricode/trueTableClass.py new file mode 100755 index 0000000..0409527 --- /dev/null +++ b/notFinishedCode/tricode/trueTableClass.py @@ -0,0 +1,198 @@ + +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 + self.asteriskServer = True + + if destination == 'GSMRZ1': + if result == '200': + self.nanoBTS1 = True + self.asteriskServer = True + elif result =='200': + self.nanoBTS1 = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMRZ2': + if result == '200': + self.nanoBTS2 = True + self.asteriskServer = True + elif result =='200': + self.nanoBTS2 = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMRZ2': + if result == '200': + self.nanoBTS3 = True + self.asteriskServer = True + elif result =='200': + self.nanoBTS3 = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMExt.O2': + if result == '200': + self.o2Card = True + self.asteriskServer = True + elif result =='200': + self.o2Card = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMExt.Voda': + if result == '200': + self.vodaCard = True + self.asteriskServer = True + elif result =='200': + self.vodaCard = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMExt.Eplus': + if result == '200': + self.eplusCard = True + self.asteriskServer = True + elif result =='200': + self.eplusCard = True + self.asteriskServer = 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 + self.asteriskServer = True + + if destination == 'GSMExt.Tm': + if result == '200': + self.tmobileCard = True + self.asteriskServer = True + elif result =='200': + self.tmobileCard = True + self.asteriskServer = 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 + self.asteriskServer = True + + -- cgit v1.2.3-55-g7522