summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortt412011-09-23 00:07:45 +0200
committertt412011-09-23 00:07:45 +0200
commit252363729ac7b011c514a8e27bec35b7b3983822 (patch)
tree8b14e3f4a04b2ca93e09ce4fddc2632dded6d606
parentnew file for advance software (diff)
downloadgsm-selftest-252363729ac7b011c514a8e27bec35b7b3983822.tar.gz
gsm-selftest-252363729ac7b011c514a8e27bec35b7b3983822.tar.xz
gsm-selftest-252363729ac7b011c514a8e27bec35b7b3983822.zip
next advance testing program build.
-rw-r--r--For Weekly Test/Advance/ClientClass.pycbin3655 -> 3601 bytes
-rw-r--r--For Weekly Test/Advance/ControllerClass.py72
-rw-r--r--For Weekly Test/Advance/ControllerClass.pycbin7406 -> 7235 bytes
-rw-r--r--For Weekly Test/Advance/DbClass.py28
-rw-r--r--For Weekly Test/Advance/DbClass.pycbin6287 -> 6892 bytes
-rw-r--r--For Weekly Test/Advance/LogFileClass.pycbin1524 -> 1494 bytes
-rw-r--r--For Weekly Test/Advance/PingClass.pycbin1275 -> 1251 bytes
-rw-r--r--For Weekly Test/Advance/SIPHandler.py6
-rw-r--r--For Weekly Test/Advance/SSHTunnelBoxClass.pycbin0 -> 1820 bytes
-rw-r--r--For Weekly Test/Advance/TestProcessLog.log0
-rw-r--r--For Weekly Test/Advance/gsmselftest.py69
-rw-r--r--For Weekly Test/Advance/initTestClass.py43
-rw-r--r--For Weekly Test/Advance/initTestClass.pycbin4266 -> 4395 bytes
-rw-r--r--For Weekly Test/Advance/trueTableClass.py278
-rw-r--r--For Weekly Test/Advance/trueTableClass.pycbin3344 -> 2805 bytes
-rw-r--r--For Weekly Test/Advance/usbDetectClass.pycbin3492 -> 3438 bytes
16 files changed, 223 insertions, 273 deletions
diff --git a/For Weekly Test/Advance/ClientClass.pyc b/For Weekly Test/Advance/ClientClass.pyc
index 6dcbc7f..f6fab0b 100644
--- a/For Weekly Test/Advance/ClientClass.pyc
+++ b/For Weekly Test/Advance/ClientClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/ControllerClass.py b/For Weekly Test/Advance/ControllerClass.py
index db9ac70..394a677 100644
--- a/For Weekly Test/Advance/ControllerClass.py
+++ b/For Weekly Test/Advance/ControllerClass.py
@@ -104,32 +104,32 @@ class doTheTest:
self.receiver.sendData('RECEIVE START')
self.caller.sendData('CALL START')
- def initAccount(self,account):
+ def initAccount(self,account):
- accConf = account
- self.username = accConf[0:accConf.find(':')]
+ accConf = account
+ self.username = accConf[0:accConf.find(':')]
- line = accConf[accConf.find(':')+1:]
- self.password = line[0:line.find(':')]
+ line = accConf[accConf.find(':')+1:]
+ self.password = line[0:line.find(':')]
- newLine = line[line.find(':')+1:]
- self.server = newLine[0:newLine.find(':')]
+ newLine = line[line.find(':')+1:]
+ self.server = newLine[0:newLine.find(':')]
def initCaller(self):
logger.logEvent('init Caller')
logger.logEvent(self.callFrom)
- self.portCaller = random.randint(30000,60000)
+ self.portCaller = random.randint(30000,60000)
- if self.callFrom[0:3] == 'GSMR':
- if self.callFrom =="GSMRZ1":
- self.initGSM(self.portCaller, self.callPortName)
- else:
- initAccount(self.account)
- self.boxCaller = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
- self.boxCaller.startTunneling()
+ if self.callFrom[0:4] == 'GSMR':
+ if self.callFrom =="GSMRZ1":
+ self.initGSM(self.portCaller, self.callPortName)
+ else:
+ initAccount(self.account)
+ self.boxCaller = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
+ self.boxCaller.startTunneling()
- elif self.callFrom[0:3] == 'GSME':
- self.initGSM(self.portCaller, self.callPortName)
+ elif self.callFrom[0:4] == 'GSME':
+ self.initGSM(self.portCaller, self.callPortName)
else:
subprocess.Popen(args=["gnome-terminal", '--command=python SIPHandler.py '+self.accCaller+ ' ' +str(self.portCaller)])
@@ -137,18 +137,18 @@ class doTheTest:
def initReceiver(self):
logger.logEvent('init Receiver')
logger.logEvent(self.dest)
- self.portDest = random.randint(30000,60000)
+ self.portDest = random.randint(30000,60000)
- if self.dest[0:3] == 'GSMR':
- if self.dest =="GSMRZ1":
- self.initGSM(self.portDest, self.destPortName)
- else:
- initAccount(self.account)
- self.boxDest = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
- self.boxDest.startTunneling()
+ if self.dest[0:4] == 'GSMR':
+ if self.dest =="GSMRZ1":
+ self.initGSM(self.portDest, self.destPortName)
+ else:
+ initAccount(self.account)
+ self.boxDest = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
+ self.boxDest.startTunneling()
- elif self.dest[0:3] == 'GSME':
- self.initGSM(self.portDest, self.destPortName)
+ elif self.dest[0:4] == 'GSME':
+ self.initGSM(self.portDest, self.destPortName)
else:
self.portDest = 50100
@@ -157,14 +157,14 @@ class doTheTest:
def initTerminate(self):
self.caller.sendData('TERMINATE CONNECTION')
self.receiver.sendData('TERMINATE CONNECTION')
- if self.callFrom[0:3] == 'GSMR' or self.callTo[0:3] == 'GSMR':
- if self.callFrom[0:4] != 'GSMR1':
- self.boxCaller.killTunneling()
- if self.callTo[0:4] != 'GSMR1':
- self.boxDest.killTunneling()
- else:
- self.receiver.closeConnection()
- self.caller.closeConnection()
+ if self.callFrom[0:4] == 'GSMR' or self.callTo[0:4] == 'GSMR':
+ if self.callFrom[0:5] != 'GSMR1':
+ self.boxCaller.killTunneling()
+ if self.callTo[0:5] != 'GSMR1':
+ self.boxDest.killTunneling()
+ else:
+ self.receiver.closeConnection()
+ self.caller.closeConnection()
def callerGreeting(self):
self.connected = None
@@ -198,7 +198,7 @@ class doTheTest:
def initGSM(self, portCommunication, portDevice, handler):
- subprocess.Popen(args=["gnome-terminal", '--command=python GSMHandler.py '+str(portCommunication)+ ' ' +str(portDevice) ' '+str(handler)])
+ subprocess.Popen(args=["gnome-terminal", '--command=python GSMHandler.py '+str(portCommunication)+ ' ' +str(portDevice)+' '+str(handler)])
diff --git a/For Weekly Test/Advance/ControllerClass.pyc b/For Weekly Test/Advance/ControllerClass.pyc
index e6ffd79..0b1d105 100644
--- a/For Weekly Test/Advance/ControllerClass.pyc
+++ b/For Weekly Test/Advance/ControllerClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/DbClass.py b/For Weekly Test/Advance/DbClass.py
index 3e4a610..8a5e69b 100644
--- a/For Weekly Test/Advance/DbClass.py
+++ b/For Weekly Test/Advance/DbClass.py
@@ -13,6 +13,9 @@ class DBMySQLConnection:
self.callerLists = list()
self.errCode = None
self.deviceUpdate = None
+ self.gsmRZList = None
+ self.gsmExtList = None
+ self.sipList = None
global debugMode
debugMode = 0
@@ -114,9 +117,32 @@ class DBMySQLConnection:
return 2 #the table doesn't exist
if debugMode == 1:
print str(e)
- return 3 #some error happened
+ return 3 #some error happened 07667929147--Fitri
else:
return 0 #I am not connected
+ def deviceList(self):
+ deviceLists = list()
+ print 'hallo'
+ if self.connectionCreated == 1:
+ try:
+ tuple = self.cur.execute("SELECT `deviceName` FROM DeviceAddressTable")
+ output = self.cur.fetchall()
+ print output
+ for data in output:
+ deviceLists.append(str(data))
+ return deviceLists
+
+#return deviceAddr
+ except MySQLdb.Error, e:
+ error = str(e)
+ if error[1:5] == '1146':
+ return 2 #the table doesn't exist
+ if debugMode == 1:
+ print str(e)
+ return 3 #some error happened
+ else:
+ print 'not conn'
+ return 0 #I am not connected
def updateGSMDevice(self, deviceName, newPortName, newNumber):
if self.connectionCreated == 1:
diff --git a/For Weekly Test/Advance/DbClass.pyc b/For Weekly Test/Advance/DbClass.pyc
index 4c25ce4..b00b026 100644
--- a/For Weekly Test/Advance/DbClass.pyc
+++ b/For Weekly Test/Advance/DbClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/LogFileClass.pyc b/For Weekly Test/Advance/LogFileClass.pyc
index 697f94a..5ae3965 100644
--- a/For Weekly Test/Advance/LogFileClass.pyc
+++ b/For Weekly Test/Advance/LogFileClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/PingClass.pyc b/For Weekly Test/Advance/PingClass.pyc
index c611576..074d907 100644
--- a/For Weekly Test/Advance/PingClass.pyc
+++ b/For Weekly Test/Advance/PingClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/SIPHandler.py b/For Weekly Test/Advance/SIPHandler.py
index 8802a09..61ca97f 100644
--- a/For Weekly Test/Advance/SIPHandler.py
+++ b/For Weekly Test/Advance/SIPHandler.py
@@ -17,8 +17,8 @@ class Account(pj.AccountCallback):
global current_call
current_call = call
- call_cb = Calling(current_call)
- current_call.set_callback(call_cb)
+ call_cb = Calling(current_call)
+ current_call.set_callback(call_cb)
logger.logEvent(current_call)
@@ -33,7 +33,7 @@ class Account(pj.AccountCallback):
class Calling(pj.CallCallback):
- def __init__(self, call=None):
+ def __init__(self, call=None):
pj.CallCallback.__init__(self, call)
def on_state(self):
diff --git a/For Weekly Test/Advance/SSHTunnelBoxClass.pyc b/For Weekly Test/Advance/SSHTunnelBoxClass.pyc
new file mode 100644
index 0000000..265da44
--- /dev/null
+++ b/For Weekly Test/Advance/SSHTunnelBoxClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/TestProcessLog.log b/For Weekly Test/Advance/TestProcessLog.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/For Weekly Test/Advance/TestProcessLog.log
diff --git a/For Weekly Test/Advance/gsmselftest.py b/For Weekly Test/Advance/gsmselftest.py
index 3e47018..f389346 100644
--- a/For Weekly Test/Advance/gsmselftest.py
+++ b/For Weekly Test/Advance/gsmselftest.py
@@ -51,46 +51,41 @@ def initTrueTable(x):
initResult = trueTableClass.trueTable(x)
initResult.initTrueTable()
print '\n'
- if initResult.o2Card == False and initResult.eplusCard == False and initResult.vodaCard == False and initResult.tmobileCard == False:
- print 'GSM BOX Modem down'
- else:
- if initResult.o2Card == False:
- print "O2 card indicate having problem"
- if initResult.eplusCard == False:
- print "eplus card indicate having problem"
- if initResult.vodaCard == False:
- print "vodaphone card indicate having problem"
- if initResult.tmobileCard == False:
- print "T-Mobile card indicate having problem"
- print '\n'
-
- if initResult.nanoBTS1 == True or initResult.nanoBTS2 == True or initResult.nanoBTS3 == True:
- print 'openBSC working'
-
- if initResult.nanoBTS1 == False and initResult.nanoBTS2 == False and initResult.nanoBTS3 == False:
- print 'openBSC down'
- else:
- if initResult.nanoBTS1 == False:
- print "nanoBTS 1 indicate having problem"
- if initResult.nanoBTS2 == False:
- print "nanoBTS 2 indicate having problem"
- if initResult.nanoBTS3 == False:
- print "nanoBTS 3 indicate having problem"
-
- if initResult.outgoingLandline == False:
- print 'outgoing call to outside network having problem'
- print '\n'
-
- if initResult.asteriskServer == False:
- print "Asterisk server indicate having problem"
- elif initResult.asteriskServer == True:
- print 'Asterisk server working good'
- print '\n'
-
+ openBSC = None
+ for x in nanoBts:
+ name = x[0]
+ if x[1] == True:
+ openBSC = True
+ asterikServer = True
+ #print name+ ' Working'
+ else:
+ print name+ ' not Working'
+
+ if openBSC == True:
+ print 'openBSC working'
+ if asterikServer == True:
+ print 'asterik server is working'
+ print '\n'
+
+ if outGoingRZ == True:
+ print 'Outgoing call from RZ is working'
+ elif outGoingRZ == False:
+ print 'Outgoing call from RZ is not working'
+
+ if incomingRZ == True:
+ print 'incoming call from outside RZ to GSM RZ is working'
+ elif incomingRZ == False:
+ print 'incoming call from outside RZ to GSM RZ is not working'
+ print '\n'
+
+
def doSipTest():
- destList = ['gsmr1','gsmr2', 'gsmr3', 'landline', 'unisip', 'GSMExt.O2', 'GSMExt.Voda', 'GSMExt.Eplus', 'GSMExt.Tm' ]
+ #destList = ['gsmr1','gsmr2', 'gsmr3', 'landline', 'unisip', 'GSMExt.O2', 'GSMExt.Voda', 'GSMExt.Eplus', 'GSMExt.Tm' ]
+ destList = ['landline']
+ print "test"
doTest = initTestClass.doTest()
+ print 'iam here'
for callTo in destList:
callFrom = 'sip'
diff --git a/For Weekly Test/Advance/initTestClass.py b/For Weekly Test/Advance/initTestClass.py
index 8552e20..9270b1a 100644
--- a/For Weekly Test/Advance/initTestClass.py
+++ b/For Weekly Test/Advance/initTestClass.py
@@ -34,9 +34,10 @@ class doTest:
def initDB(self):
+ #self.db = DbClass.DBMySQLConnection('root', 'SQLrandompassword', 'localhost', 'gsmselftesting')
self.db = DbClass.DBMySQLConnection('root', 'randompasswordSQL', 'localhost', 'gsmselftesting')
- self.db.connectDB()
- self.dbStatus = self.db.connectDB()
+ self.db.connectDB()
+ self.dbStatus = self.db.connectDB()
def initaccount(self,account,handler):
if handler == 'sip' or handler == 'unisip' or handler == 'landline':
@@ -58,11 +59,11 @@ class doTest:
self.ping(callFrom)
if self.serverStatus <> 0:
- self.ping(callTo)
+ self.ping(callTo)
if self.serverStatus <> 0:
- dest = self.db.deviceAddress(str(callTo))
- caller = self.db.deviceAddress(str(callFrom))
+ dest = self.db.deviceAddress(str(callTo))
+ caller = self.db.deviceAddress(str(callFrom))
self.initaccount(caller,callFrom)
if self.status == 1:
@@ -77,7 +78,7 @@ class doTest:
makeTest = ControllerClass.doTheTest(callFrom, callPortName, accCaller, callTo, destPortName, destNo, accDest)
makeTest.FuncTest()
- self.result = str(makeTest.testResult)
+ self.result = str(makeTest.testResult)
else:
self.result = 100
else:
@@ -104,14 +105,26 @@ class doTest:
x = x+1
def smartTest(self):
- global handlerError
- smartResultList = list()
- testPendingList = list()
+ self.initDB()
+ self.smartResultList = list()
#callerList = ['sip']
- destList = ['GSMRZ1','GSMRZ2','GSMRZ3','GSMExt.O2','GSMExt.Voda','GSMExt.Eplus','GSMExt.Tm']
- gsmList = ['GSMExt.O2','GSMExt.Voda','GSMExt.Eplus','GSMExt.Tm']
- gsmRZList = ['GSMRZ1','GSMRZ2','GSMRZ3']
-
+ deviceLists = self.db.deviceList()
+ gsmList = list()
+ gsmRZList = list()
+ sipList = list()
+ print 'basil', deviceLists
+
+ for device in deviceLists:
+ if device[0:5] == 'GSMRZ':
+ gsmRZList.append(device)
+ elif device[0:5] == 'GSMEx':
+ gsmList.append(device)
+ else:
+ sipList.append(device)
+
+ if device[0:5] == 'GSMRZ' or device[0:5] == 'GSMEx':
+ destList.append(device)
+
i = random.randint(0, len(gsmRZList)-1)
callTo = gsmRZList[i]
self.initTest('unisip',callTo)
@@ -122,7 +135,7 @@ class doTest:
if openBSC == 200:
for callFrom in gsmRZList:
- i = random.randint(3, len(destList)-1) # need to check wheter the caller and dest is same
+ i = random.randint(3, len(destList)-1) # need to check whether the caller and dest are same
callTo = destList[i]
self.initTest(callFrom,callTo)
destList.remove(callTo)
@@ -138,7 +151,7 @@ class doTest:
for callTo in destList:
callFrom = 'sip'
self.initTest(callFrom,callTo)
- self.smartResultList.append([callFrom, callTo, self.result])
+ self.smartResultList.append([callFrom, callTo, self.result])
return self.smartResultList
diff --git a/For Weekly Test/Advance/initTestClass.pyc b/For Weekly Test/Advance/initTestClass.pyc
index 0a34a8c..6b8a19a 100644
--- a/For Weekly Test/Advance/initTestClass.pyc
+++ b/For Weekly Test/Advance/initTestClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/trueTableClass.py b/For Weekly Test/Advance/trueTableClass.py
index 0409527..f8e78cf 100644
--- a/For Weekly Test/Advance/trueTableClass.py
+++ b/For Weekly Test/Advance/trueTableClass.py
@@ -6,193 +6,109 @@ class trueTable:
self.nanoBTS1 = None
self.nanoBTS2 = None
self.nanoBTS3 = None
- self.o2Card = None
+ self.o2Card = None
self.eplusCard = None
self.vodaCard = None
self.tmobileCard = None
- self.outgoingLandline = None
+ self.self.outGoingRZ = None
self.asteriskServer = None
+ self.incomingRZ = None
+ self.openBSC = 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
+ 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
+ nanoBts = list()
+ gsmResultList = list()
+ outGoingRZ = None
+ incomingRZ = None
+ i= 1
+ for x in lists:
+ call=x[0]
+ dest=x[1]
+ #print call[0:5]
+ if call[0:5]=='GSMRZ':
+ for y in lists:
+ caller = y[0]
+ desti=y[1]
- 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
-
+ 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
+ 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':
+ while stop != True:
+ if j != int(i):
+ key = 'GSMRZ'+str(j)
+ if key == call or key == dest:
+ if result == '200':
+ self.asteriskServer = True #set status of asterik server as working
+ if len(nanoBts) == 0:
+ nanoBts.append(['nanoBts '+str(j),True])
+ else:
+ found = False
+ for y in nanoBts: #find the existing nanoBts result
+ name = y[0]
+ if name == 'nanoBts '+str(j):
+ found = True
+ if found != True: #if doesnt found the nanoBts, add the result to the list, otherwise just ignoring
+ nanoBts.append(['nanoBts '+str(j),True])
+ found = False
+ if key == call:#
+ for z in externalRZList:# find the result for outgoing call from GSM RZ to external RZ network
+ if dest == z:
+ self.outGoingRZ = True #set status as working for outgoing RZ
+ if key == dest and call == 'landline':
+ for z in externalRZList:
+ if dest == z:
+ self.incomingRZ = True # find the result for imcoming call to GSM RZ from external RZ network
+ else:
+ if key == call:# and dest == 'landline':
+ for z in externalRZList:
+ if dest == z:
+ self.outGoingRZ = False
+ if key == dest:# and call == 'landline':
+ for z in externalRZList:
+ if call == z:
+ self.incomingRZ = False
+ nanoBts.append(['nanoBts '+str(j),False])
+
+
+ j = j+1
+ elif j == int(i):
+ stop = True
+
+ if call[0:5]=='GSMEx': # looking for calling from GSMexternal
+ found = False
+ if len(nanoBts) ==0:
+ nanoBts.append([call,result])
+ found = False
+ else:
+ for y in nanoBts: #find the existing result for GSM external in the list
+ name = y[0]
+ if name == call:
+ found = True
+ if found != True:
+ nanoBts.append([call,result])
+
+ if dest[0:5]=='GSMEx': # looking for destination call to GSMexternal
+ found = False
+ if len(nanoBts) ==0:
+ nanoBts.append([dest,result])
+ found = False
+ else:
+ for y in nanoBts:
+ name = y[0]
+ if name == dest:
+ found = True
+ if found != True:
+ nanoBts.append([dest,result])
diff --git a/For Weekly Test/Advance/trueTableClass.pyc b/For Weekly Test/Advance/trueTableClass.pyc
index 9255949..d31e033 100644
--- a/For Weekly Test/Advance/trueTableClass.pyc
+++ b/For Weekly Test/Advance/trueTableClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/usbDetectClass.pyc b/For Weekly Test/Advance/usbDetectClass.pyc
index 4cffa13..ad2ae14 100644
--- a/For Weekly Test/Advance/usbDetectClass.pyc
+++ b/For Weekly Test/Advance/usbDetectClass.pyc
Binary files differ