summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/Backup/truetable.py
diff options
context:
space:
mode:
authortt412011-09-05 01:35:23 +0200
committertt412011-09-05 01:35:23 +0200
commit6a1abfac914ad28486ff468b4c63f305e49858e5 (patch)
treec5d478d6d0c7a6a23bc67b1b4e462a6ca9d73513 /For Weekly Test/Backup/truetable.py
parentadd gsm device detecting feature (diff)
downloadgsm-selftest-6a1abfac914ad28486ff468b4c63f305e49858e5.tar.gz
gsm-selftest-6a1abfac914ad28486ff468b4c63f305e49858e5.tar.xz
gsm-selftest-6a1abfac914ad28486ff468b4c63f305e49858e5.zip
moving file.
Diffstat (limited to 'For Weekly Test/Backup/truetable.py')
-rw-r--r--For Weekly Test/Backup/truetable.py211
1 files changed, 211 insertions, 0 deletions
diff --git a/For Weekly Test/Backup/truetable.py b/For Weekly Test/Backup/truetable.py
new file mode 100644
index 0000000..6675ccd
--- /dev/null
+++ b/For Weekly Test/Backup/truetable.py
@@ -0,0 +1,211 @@
+def initTrueTable():
+
+ resultsList = [['sip', 'GSMExt.Eplus', '486'], ['unisip', 'GSMExt.Tm', '486'], ['sip', 'GSMExt.O2', '200'], ['landline', 'GSMExt.Voda', '486'], ['sip', 'landline', '486'], ['sip', 'unisip', '200'], ['unisip', 'sip', '486'], ['GSMRZ1','landline', '486'], ['GSMRZ2','landline' ,'486'], ['GSMRZ3','landline', '486']]
+ #resultsList = [['GSMExt.Eplus', 'GSMRZ1', '486'], ['unisip', 'sip', '486'], ['landline', 'sip', '200'], ['unisip', 'sip', '486']]
+
+ nanoBTS1 = None
+ nanoBTS2 = None
+ nanoBTS3 = None
+ o2Card = None
+ eplusCard = None
+ vodaCard = None
+ tmobileCard = None
+ outgoingLandline = None
+
+ for x in resultsList:
+
+ destination = x[1]
+ result = x[2]
+ caller = x[0]
+
+ if destination == 'GSMRZ1':
+ if result =='486':
+ nanoBTS1 = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMRZ1':
+ if result == '200':
+ nanoBTS1 = True
+
+ if destination == 'GSMRZ1':
+ if result == '200':
+ nanoBTS1 = True
+ elif result =='200':
+ nanoBTS1 = True
+
+ elif destination == 'GSMRZ2':
+ if result =='486':
+ nanoBTS2 = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMRZ2':
+ if result == '200':
+ nanoBTS2 = True
+
+ if destination == 'GSMRZ2':
+ if result == '200':
+ nanoBTS2 = True
+ elif result =='200':
+ nanoBTS2 = True
+
+ elif destination == 'GSMRZ3':
+ if result =='486':
+ nanoBTS3 = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMRZ3':
+ if result == '200':
+ nanoBTS3 = True
+
+ if destination == 'GSMRZ2':
+ if result == '200':
+ nanoBTS3 = True
+ elif result =='200':
+ nanoBTS3 = True
+
+ elif destination == 'GSMExt.O2':
+ if result =='486':
+ o2Card = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMExt.O2':
+ if result == '200':
+ o2Card = True
+
+ if destination == 'GSMExt.O2':
+ if result == '200':
+ o2Card = True
+ elif result =='200':
+ o2Card = True
+
+ elif destination == 'GSMExt.Voda':
+ if result =='486':
+ vodaCard = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMExt.Voda':
+ if result == '200':
+ vodaCard = True
+
+ if destination == 'GSMExt.Voda':
+ if result == '200':
+ vodaCard = True
+ elif result =='200':
+ vodaCard = True
+
+ elif destination == 'GSMExt.Eplus':
+ if result =='486':
+ eplusCard = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMExt.Eplus':
+ if result == '200':
+ eplusCard = True
+
+ if destination == 'GSMExt.Eplus':
+ if result == '200':
+ eplusCard = True
+ elif result =='200':
+ eplusCard = True
+
+ elif destination == 'GSMExt.Tm':
+ if result =='486':
+ tmobileCard = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'GSMExt.Tm':
+ if result == '200':
+ tmobileCard = True
+
+ if destination == 'GSMExt.Tm':
+ if result == '200':
+ tmobileCard = True
+ elif result =='200':
+ tmobileCard = True
+
+ elif destination == 'sip':
+ if result =='486':
+ asteriskServer = False
+ for y in resultsList:
+ call = y[0]
+ destination = y[1]
+ result = y[2]
+ if call == 'sip':
+ if result == '200':
+ asteriskServer = True
+
+ if destination == 'sip':
+ if result == '200':
+ asteriskServer = True
+
+ elif result =='200':
+ asteriskServer = True
+
+ if caller == 'GSMRZ1' or caller == 'GSMRZ2' or caller == 'GSMRZ3':
+
+ if destination == 'landline':
+ if result =='486':
+ outgoingLandline = False
+ for y in 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':
+ outgoingLandline = True
+
+ print '\n'
+ if o2Card == False and eplusCard == False and vodaCard == False and tmobileCard == False:
+ print 'GSM BOX Modem down'
+ else:
+ if o2Card == False:
+ print "O2 card indicate having problem"
+ if eplusCard == False:
+ print "eplus card indicate having problem"
+ if vodaCard == False:
+ print "vodaphone card indicate having problem"
+ if tmobileCard == False:
+ print "T-Mobile card indicate having problem"
+ print '\n'
+
+ if nanoBTS1 == False and nanoBTS2 == False and nanoBTS3 == False:
+ print 'openBSC down'
+ else:
+ if nanoBTS1 == False:
+ print "nanoBTS 1 indicate having problem"
+ if nanoBTS2 == False:
+ print "nanoBTS 2 indicate having problem"
+ if nanoBTS3 == False:
+ print "nanoBTS 3 indicate having problem"
+
+ if outgoingLandline == False:
+ print 'outgoing from GSM RZ to landline having problem'
+ print '\n'
+
+ if asteriskServer == False:
+ print "Asterisk server indicate having problem"
+ elif asteriskServer == True:
+ print 'Asterisk server working good'
+ print '\n'
+
+initTrueTable()
+
+
+
+
+