aboutsummaryrefslogtreecommitdiffstats
path: root/suites
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-23 11:03:07 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-12-05 15:06:53 +0100
commita5ed18ac7e2d8161d8438762404b55e20fe6a329 (patch)
tree5f219879013b314af59c119be76180961317cee8 /suites
parentde899619cf3ce7da4c6ef9932f196668e799edc1 (diff)
suites: aoip_debug: Start GPRS services
Diffstat (limited to 'suites')
-rwxr-xr-xsuites/aoip_debug/interactive.py45
-rw-r--r--suites/aoip_debug/suite.conf2
2 files changed, 43 insertions, 4 deletions
diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py
index cad68b7..312083a 100755
--- a/suites/aoip_debug/interactive.py
+++ b/suites/aoip_debug/interactive.py
@@ -2,30 +2,40 @@
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
+pcu = bts.pcu()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
stp = suite.stp()
+ggsn = suite.ggsn()
+sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgcpgw, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
+
modems = suite.modems(int(prompt('How many modems?')))
+bsc.bts_add(bts)
+sgsn.bts_add(bts)
+
hlr.start()
stp.start()
+ggsn.start()
+sgsn.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
-
-bsc.bts_add(bts)
bsc.start()
bts.start()
+print('Waiting for bts to be ready...')
+wait(bts.ready_for_pcu)
+pcu.start()
for m in modems:
hlr.subscriber_add(m)
m.connect(msc.mcc_mnc())
while True:
- cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [<ms_msisdn>], call-dial <src_msisdn> <dst_msisdn>, call-wait-incoming <src_msisdn> <dst_msisdn>, call-answer <mt_msisdn> <call_id>, call-hangup <ms_msisdn> <call_id>, ussd <command>')
+ cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [<ms_msisdn>], call-dial <src_msisdn> <dst_msisdn>, call-wait-incoming <src_msisdn> <dst_msisdn>, call-answer <mt_msisdn> <call_id>, call-hangup <ms_msisdn> <call_id>, ussd <command>, data-attach, data-wait, data-detach, data-activate')
cmd = cmd.strip().lower()
if not cmd:
@@ -115,5 +125,34 @@ while True:
response = ms.ussd_send(ussd_cmd)
print('modem %s: response=%r' % (ms.name(), response))
+ elif cmd.startswith('data-attach'):
+ if len(params) != 1:
+ print('wrong format')
+ continue
+ for ms in modems:
+ print('modem %s: attach' % ms.name())
+ ms.attach()
+ wait(ms.is_attached)
+ print('modem %s: attached' % ms.name())
+
+ elif cmd.startswith('data-detach'):
+ if len(params) != 1:
+ print('wrong format')
+ continue
+ for ms in modems:
+ print('modem %s: detach' % ms.name())
+ ms.attach()
+ wait(lambda: not ms.is_attached())
+ print('modem %s: detached' % ms.name())
+
+ elif cmd.startswith('data-activate'):
+ if len(params) != 1:
+ print('wrong format')
+ continue
+ for ms in modems:
+ print('modem %s: activate' % ms.name())
+ response = ms.activate_context()
+ print('modem %s: response=%r' % (ms.name(), response))
+
else:
print('Unknown command: %s' % cmd)
diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf
index d75cacb..2f36e1d 100644
--- a/suites/aoip_debug/suite.conf
+++ b/suites/aoip_debug/suite.conf
@@ -1,6 +1,6 @@
resources:
ip_address:
- - times: 6
+ - times: 8
bts:
- times: 1
modem: