aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
AgeCommit message (Collapse)AuthorFilesLines
2015-01-30gprs: Support cancellation typeJacob Erlbeck1-1/+1
The cancellation type that is part of the UpdateCancellation message is currently ignored. This patch adds the missing glue between the existing GSUP and GMM support. If the type is not present or has the value updateProcedure the subcriber and MM context are siliently removed. Otherwise, a message with cause 'implicitly detached' is sent to the MS. Since the real cause is not known (the specification neither added a cause IE nor defined a static cause value), the MS may get the real cause in the following AttachRej. Added VTY commands: - update-subscriber imsi IMSI cancel update-procedure - update-subscriber imsi IMSI cancel subscription-withdraw the old form without the cause is no longer supported. Sponsored-by: On-Waves ehf
2015-01-28gprs: Don't use subscr->keep_in_ram in normal operationJacob Erlbeck1-0/+3
Currently the keep_in_ram flag is explicitely reset in gprs_subscr_cleanup to cover the case, that the VTY 'create' sub-command has been used to create the subscriber entry. This commit completely removes keep_in_ram handling from gprs_subscriber.c and adds a VTY 'destroy' sub-command to reset the flag and remove the entry. So 'create' and 'destroy' can be used to manager sticky entries that are kept even when a location cancellation is done. Added VTY command: - update-subscriber imsi IMSI destroy Sponsored-by: On-Waves ehf
2015-01-20sgsn: Restructure the 'update-subscriber' commandJacob Erlbeck1-5/+5
This patch drops the following commands: - update-subscriber imsi IMSI insert authorized <0-1> - update-subscriber imsi IMSI commit since they are already covered by the 'update-location-result' sub-command, except that this command doesn't create an new entry if none is found with the given IMSI. It adds the following command: - update-subscriber imsi IMSI create which can be used to create a new entry. Sponsored-by: On-Waves ehf
2014-12-09sgsn: Add VTY commands to manage subscriber cacheJacob Erlbeck1-0/+16
This adds the following commands to the ENABLE node: - show subscriber cache - update-subscriber imsi IMSI insert authorized (0|1) - update-subscriber imsi IMSI cancel - update-subscriber imsi IMSI commit These commands are mainly testing tools and maintenance helpers. The update commands work asynchronously and can be used to complete a pending update request or to terminate an existing connection. The 'insert' command just update the subscriber records but does not notify the GMM layer. Invoke the 'commit' command to continue with pending procedures. Note that the subscriber cache is not stored persistently and will always be empty after an SGSN restart. Sponsored-by: On-Waves ehf
2014-12-09sgsn: Integrate subscriber handling into the SGSNJacob Erlbeck1-0/+3
This commit adds a new authorization policy 'remote' and uses the subscriber cache for authorization when this policy is being used. Note that there is no remote backend implemented yet. After the IMSI/IMEI have been acquired, a request would be sent to the remote peer. The attach/auth-ciph procedure continues when authorization info has been received from the peer. This means, that gprs_subscr_update() must be called then to tell the GMM layer that it can proceed. A later commit will add VTY commands to do this manually. Sponsored-by: On-Waves ehf
2014-11-19mgcp: Allow to omit sending the audio name at allHolger Hans Peter Freyther1-0/+15
Equipment like AudioCode appears to get upset when we use a builtin type and then assign a name to it. Allow to completely omit the name.
2014-11-14sgsn: Add 'acl-only' authentication policyJacob Erlbeck1-0/+16
Currently the VTY 'auth-policy' command results in setting or clearing the acl_enabled flag. This also enables the matching of the MCC/MNC prefix of the IMSI. This patch adds an additional policy 'acl-only' which disables the MCC/MNC matching and relies on the ACL only. Sponsored-by: On-Waves ehf
2014-11-14sgsn/test: Add VTY tests for the SGSNJacob Erlbeck1-0/+53
This patch adds some basic SGSN tests to vty_test_runner.py: - check for config tree nodes - check specific show commands Sponsored-by: On-Waves ehf
2014-10-29bsc: Allow to disable sending ping/pong to the MSCHolger Hans Peter Freyther1-0/+42
Some switches do not like to receive the IPA PING/PONG messages. Allow to disable the handling with "no timeout-ping" and create test cases that verify the switching between the modes. Change the code to trat <= 0 as an invalid timeout. Fixes: SYS#713
2014-10-03nitb: Add subscriber delete commandRuben Pollan1-1/+9
2014-07-07mgcp: Verify that the force-ptime is written back to the fileHolger Hans Peter Freyther1-0/+22
When the command was added it was not verified that. Add a very basic MGCP VTY test and test that the string appears in the config.
2014-03-06nitb: Add a test for "show network" in the python testsuite.Ciaby1-0/+8
Make sure that bsc_gsmnet->bsc_data->rf_ctrl is initialized for NITB. In commit a9fae1ae66df57f76a0aedbd0b56228959d37d56 the conditions for the rf_ctrl was removed but it was still needed for the NITB. Fixes regression from: a9fae1ae66df57f76a0aedbd0b56228959d37d56 bsc: rf_ctrl will always be created, remove the NULL checks
2014-03-06nat: Add CTRL command test case for the new control commandsHolger Hans Peter Freyther1-1/+1
2014-01-20nat: Make the access-list deny cause configurableHolger Hans Peter Freyther1-0/+38
Add two optional arguments to the imsi-deny rule for the reject cause and verify that it is saved out.
2014-01-16si: Add a config option to disable SI2ter/SI2bis/SI5ter/SI5bis messagesJacob Erlbeck1-0/+18
The iPhone5 (US) appears to have some issues with the SIs generated, or the nanoBTS is not sending them correctly. Add a configurable hack to put all bands into the SI2/SI5 message. It is enabled by the bts VTY command 'force-combined-si'. This is a quick change without much reflection and watching for side effects. I have verfied that a network with ARFCN 134 and neighbors ARFCN 130 and 512 do not get generate the SI2ter and announce everything inside the SI2. This patch is conceptually based on 'si: Add a hack to disable SI2ter/SI2bis/SI5ter/SI5bis messages' (692daaf2d2). Ticket: OW#1062 Sponsored-by: On-Waves ehf
2013-11-22bsc: Add a VTY command to show the paging group for a BSC/IMSIHolger Hans Peter Freyther1-0/+6
2013-10-30vty: Enable the end/exit test for libosmocore nodesJacob Erlbeck1-13/+6
This patch replaces the calls to ignoredCheckForEndAndExit by calls to checkForEndAndExit to test the libosmocore nodes, too. The former method is removed. Sponsored-by: On-Waves ehf
2013-10-24gbproxy/vty: Enhance delete-gbproxy-peer commandJacob Erlbeck1-0/+16
This adds the option to delete all BVC peers and/or NS_VC with a given NSEI with a single command. Static (configured) NS-VC are not affected. In addition, all connections for this NSEI that can be deleted by this command can be listed without deleting them by appending 'dry-run' to the command. Sponsored-by: On-Waves ehf
2013-10-24gbproxy: Add basic VTY testsJacob Erlbeck1-0/+40
This checks for the ns and gbproxy config nodes and show commands. Sponsored-by: On-Waves ehf
2013-10-24vty: Fix whitespace in test scriptJacob Erlbeck1-7/+7
Expands leading tabs and removes trailing whitespace. Sponsored-by: On-Waves ehf
2013-10-05nitb: Add "subscriber create" VTY command.Alexander Chemeris1-0/+16
It may be useful in production, but it's really required for VTY testing of subscriber related commands.
2013-09-19bsc/mminfo: Patch timezone and DST in MM Info messagesJacob Erlbeck1-0/+34
This adds in-place patching of the time information in the MM INFORMATION message. The timezone in the 'Local time zone' and the 'Universal time and local time zone' information elements and the offset in the 'Network Daylight Saving Time' information element are optionally set. The new values are determined by the 'timezone' vty command in the config_net_bts node. That command is extended by an optional DST offset parameter. Tests are provided for the vty part and for the plain bsc_scan_msc_msg() function. Sponsored-by: On-Waves ehf Ticket: OW#978
2013-09-18bsc: Add vty command for setting Access control classes.Ivan Kluchnikov1-0/+35
2013-09-11vty: Hide unconfigured BTS on 'write'Jacob Erlbeck1-0/+11
This prevents the application from crashing when there is a half configured BTS (e.g. by using the command 'bts 1' when there isn't a BTS 1) and the 'write' command is used.
2013-09-11ussd: Send USSD on call setup on MSC errorsJacob Erlbeck1-2/+33
Send an USSD message to the mobile station requesting a connection for a call or a SMS when the link to the MSC is down or in the grace period. The messages can be set (and this feature activated) by setting bsc/missing-msc-text resp. msc/bsc-grace-text via the vty. The generation of both messages has been tested manually. Ticket: OW#957
2013-09-02vty: Attempt to fix the build when SMPP is not enabledHolger Hans Peter Freyther1-8/+19
2013-09-02vty: Rename 'mgcp-through-msc-ipa' command to 'use-msc-ipa-for-mgcp'Jacob Erlbeck1-4/+4
Currently the 'mgcp' command fails in the 'config-nat' node, because it get confused with 'mgcp-through-msc-ipa' which is executed instead because of the prefix based command selection. Thus the latter command is renamed by this patch to avoid the common prefix. The workaround in the test suite is removed.
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-19/+5
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-09-02vty: Add test to check vty node hierarchy and related commandsJacob Erlbeck1-3/+152
These tests check for the availability of 'exit' and 'end' in each configuration node and for the node specific commands to traverse the tree. In addition, using these commands from within inner contexts is checked. This will detect problems, when an outer command word is a prefix of an inner command, like with 'mgcp' and 'mgcp-through-msc-ipa'. Several assertions are disabled due to inconsistencies and missing commands (see above).
2013-08-28bsc/vty: Add 'no bsc-welcome-text' commandJacob Erlbeck1-0/+7
There was no command to reset a bsc-welcome-text string, so it has been added.
2013-08-28bsc/ussd: Optionally send USSD message on MSC disconnectionJacob Erlbeck1-0/+41
Send an USSD message on each MS connection if the connection to the MSC has been lost. Add a vty config command 'bsc-msc-loss-txt' in 'config-msc' to set the notification string and to enable the feature. Ticket: OW#957
2013-08-14nat/ussd: Add 'show ussd-connection' vty commandJacob Erlbeck1-0/+49
This command returns the current state of the connection to the USSD side channel provider. It shows whether a provider has been connected and authorized or not. Fixes: OW#953
2013-07-31nat: Implement a post-routing for the NAT softwareHolger Hans Peter Freyther1-0/+8
* The post-routing is applied after the first re-writing. To do this the new number is copied back into the called data structure. * Add a testcase that goes from 0172 to 0049 and then back to 0049 using the post rule with a table lookup.
2013-07-31nat: Allow to use the prefix lookup to rewrite numbersHolger Hans Peter Freyther1-0/+21
* Increase the rewritten rule to five digits (this is the easiest for the unit test). This will add another 40kb to the runtime size. * Create a unit test that tests adding and removing the prefix rules. * Use the regexp match to replace from one package
2013-07-31nat: Add a no number-rewrite command and call it through a VTY testHolger Hans Peter Freyther1-2/+6
The test is just testing the invocation but does not verify that the side effect of this call. It is good enought for now.
2013-07-27tests: TestCase.assertGreater is not available on Python 2.5Holger Hans Peter Freyther1-2/+2
The jenkins build node has Python 2.5.X installed and the assertGreater method is not available. Use assert_ until we can use newer versions of Python.
2013-07-27expiration: Allow to disable the periodic location updating procedureHolger Hans Peter Freyther1-0/+32
Disable the periodic LU using "no periodic location update" VTY command. In that case set the expire_lu to 0 which will then be translated to a NULL in the database layer. This leads to a bit of copy and paste in the db_sync_subscriber method but I don't see how we could easily use 'datetime(%i, 'unixepoch')' and 'NULL' at the same time. Change the query to find expired queries to check for NOT NULL and the time being in the past. This means if there are still old subscribers in the database they might not be expired. One would need to execute a query like "UPATE Subscriber SET expire_lu = 0 WHERE expire_lu is null". The same applies when disabling the periodic LU. One would need to update the database by hand. Manual tests executed/passed: 1.) periodic LU enabled: * use gst LUTest.st to do a LU * UPDATE Subscriber SET expire_lu=datetime('now'); * observe the subscriber being expired (it was) 2.) periodic LU disabled: * use gst LUTest.st to do a LU * verify that the expire_lu is NULL in the database
2013-06-24tests: Add a custom test runner to test the VTY functionality.Holger Hans Peter Freyther1-0/+110
Begin with the NAT code. It is not clear yet if we will have one file with all the tests or will have a sub directory with *.py files. In the long run the base class will move to the osmo-python-tests module.