From d513d1141e13e8f29cf7c17cfb266c95e2daed68 Mon Sep 17 00:00:00 2001 From: Triatmoko Date: Fri, 18 Nov 2011 23:29:26 +0100 Subject: edit truth table for manual command --- Code/Server-Code/gsmselftest.py | 11 +++++++---- Code/Server-Code/truthtableClass.py | 12 ++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Code/Server-Code/gsmselftest.py b/Code/Server-Code/gsmselftest.py index e5ca4ee..55f1415 100644 --- a/Code/Server-Code/gsmselftest.py +++ b/Code/Server-Code/gsmselftest.py @@ -241,12 +241,12 @@ def smartTest(): if callFrom != callTo: testDest(callFrom, callTo, 1) - #checking unsuccess call, to make sure that destination are really unreachable + #checking unsuccess call, to make sure that the result are valid for dest in smartResultList: #check unsuccess call and did the test have already tried, 2 means has been check if int(dest[2]) == 486 or int(dest[2]) == 999 or int(dest[2]) == 998 or int(dest[2]) == 801 or int(dest[2]) == 802: - if int(dest[3]) != 2 and dest[1] != 'sip': + if int(dest[3]) != 2: testDestination = True testFromRZ = False testCaller = True @@ -269,8 +269,11 @@ def smartTest(): if testFromRZ != True: callFrom = 'sip' callTo = dest[1] - testDest(callFrom, callTo, 2) - rem.append(dest) + if callFrom != callTo: + testDest(callFrom, callTo, 2) + rem.append(dest) + else: + continue #check unsuccess call because caller handler having problem #destination handler having problem, we should make test also to the caller diff --git a/Code/Server-Code/truthtableClass.py b/Code/Server-Code/truthtableClass.py index 63151bc..df6738b 100644 --- a/Code/Server-Code/truthtableClass.py +++ b/Code/Server-Code/truthtableClass.py @@ -8,7 +8,7 @@ class trueTable: self.asteriskServer = None self.incomingRZ = None self.openBSC = None - self.nanoBTS = None + self.nanoBTS = '' self.deviceStatus = list() self.testMount = len(resultsList) self.OK = 0 @@ -22,7 +22,7 @@ class trueTable: self.dbStatus = self.db.connectDB() def lookingBTSname(self, btsname): - if len(self.nanoBts) == 0: + if self.nanoBts == '': self.found = False else: found = False @@ -183,13 +183,13 @@ class trueTable: self.nanoBts.append([btsName,False]) elif (str(result) == '801' or str(result) == '999') and key == call: - self.lookingBTSname(key) - if self.found != True: + #self.lookingBTSname(key) + if self.lookingBTSname(key) != True: self.nanoBts.append([key,result]) elif (str(result) == '802' or str(result) == '998') and key == dest: - self.lookingBTSname(key) - if self.found != True: + #self.lookingBTSname(key) + if self.lookingBTSname(key) != True: self.nanoBts.append([key,result]) j = j+1 -- cgit v1.2.3-55-g7522