From 42eef9ac46c877cc186715ae327d105b66b9e786 Mon Sep 17 00:00:00 2001 From: gsmselftest Date: Fri, 14 Oct 2011 16:47:54 +0200 Subject: rearragne backup file. --- For Weekly Test/Advance/trueTableClass.py | 52 +++++++++++++++++-------------- 1 file changed, 29 insertions(+), 23 deletions(-) mode change 100644 => 100755 For Weekly Test/Advance/trueTableClass.py (limited to 'For Weekly Test/Advance/trueTableClass.py') diff --git a/For Weekly Test/Advance/trueTableClass.py b/For Weekly Test/Advance/trueTableClass.py old mode 100644 new mode 100755 index 88b3d81..74d2bd0 --- a/For Weekly Test/Advance/trueTableClass.py +++ b/For Weekly Test/Advance/trueTableClass.py @@ -24,40 +24,40 @@ class trueTable: for devLists in deviceLists: #define category of the external devices device = devLists[0] - if device[0:5] == 'GSMRZ' or device[0:5] == 'GSMEx' or device == 'landline': + if device[0:5] == 'GSMEx' or device == 'landline': externalRZList.append(device) # fetch into the list self.db.closeDBConn() lists = self.resultsList - #externalRZList = ['GSMExt.Tm','GSMExt.O2','GSMExt.Voda','GSMExt.Eplus','landline'] # should fetch this from DB or mix between external GSM and SIP side. - #fetch list from DB self.nanoBts = list() gsmResultList = list() - + print externalRZList i= 1 - for x in lists: - call=x[0] - dest=x[1] + for w in lists: + call=w[0] + dest=w[1] + + + if call[0:5]=='GSMRZ': + if i <= int(call[5:]): + i = int(call[5:]) + if dest[0:5]=='GSMRZ': - if call[0:5]=='GSMRZ': - for y in lists: - caller = y[0] - desti=y[1] - - if i <= call[5:]: - i = call[5:] - i = int(i)+1#also can get from length of the GSMRZ found in DB,maybe its more easy to use it + if i <= int(dest[5:]): + i = int(dest[5:]) + i = i+1 for x in lists: # to find nanoBts, asterik server and open BSC status regarding result test for GSM RZ call=x[0] dest=x[1] result=x[2] stop = False j=1 - - if call[0:5]=='GSMRZ' or dest[0:5]=='GSMRZ': + + if call[0:5]=='GSMRZ' or dest[0:5]=='GSMRZ': while stop != True: - if j != int(i): + if j != i: key = 'GSMRZ'+str(j) if key == call or key == dest: + stop = True if result == '200': self.asteriskServer = True #set status of asterik server as working if len(self.nanoBts) == 0: @@ -89,15 +89,19 @@ class trueTable: if call == z: self.incomingRZ = False self.nanoBts.append(['nanoBts '+str(j),False]) - else: # find how to solve this!!! - print "handler error" + if result == '998' and key == dest: # find how to solve this!!! + print 'GSMRZ'+str(j)+ " handler error" + + if result == '999' and key == call: # find how to solve this!!! + print 'GSMRZ'+str(j)+ " handler error" + print '' j = j+1 - elif j == int(i): + elif j == i: stop = True - if call[0:5]=='GSMEx': # looking for calling from GSMexternal + if call[0:5]=='GSMEx': # looking for calling from GSMexternal found = False if len(self.nanoBts) ==0: self.nanoBts.append([call,result]) @@ -110,7 +114,7 @@ class trueTable: if found != True: self.nanoBts.append([call,result]) - if dest[0:5]=='GSMEx': # looking for destination call to GSMexternal + if dest[0:5]=='GSMEx': # looking for destination call to GSMexternal found = False if len(self.nanoBts) ==0: self.nanoBts.append([dest,result]) @@ -123,4 +127,6 @@ class trueTable: if found != True: self.nanoBts.append([dest,result]) + print self.incomingRZ + print self.outGoingRZ -- cgit v1.2.3-55-g7522