delete_sessions.py

The delete_sessions.py script deletes sessions on one or more devices.

If any error is received from a device, delete_sessions.py keeps running and writes unprocessed device IDs to the unprocessedDevices.txt file. For information about using the SubMan APIs to delete sessions, see MATRIXX Subscriber Management API.

Syntax

Important: The delete_sessions.py script must be run on a processing pod.
delete_sessions.py [options] deviceIdentifier_1 deviceIdentifier_2 deviceIdentifier_n
delete_sessions.py [options] -f inFile 
Note: You must specify a list of device identifiers or a device input file. You cannot specify both.

Options

-h, --help
Displays help information for this script.
-H URI, --host URI
Specifies the URI Engine to which to connect. The default is localhost:4060.
-s sessionType, --session=sessionType
Specifies the type of sessions to validate. The sessionType options are:
  • All (default)
  • Gy
  • Sy
  • Gx
  • Rx
  • Tcap
  • Sh
-y sessionIdList, --sessions=sessionIdList
Specifies a comma-separated list of session ids to delete.
-f inFile, --file=inFile
Specifies the name of an input file of device identifiers. The file should list one id per line. Lines commented out with a # symbol are ignored. For example:
device_ids.txt:
408-123-4567
650-123-4567
-t queryType, --type=queryType
Specifies the device identifier type:
  • ObjectId (default)
  • ExternalId
  • Imsi
  • AccessNumber
  • LoginId
  • AccessId

This is applicable only if device ids are specified as arguments or are included in the input file.

-v, --verbose
Prints verbose processing information.
--throttle=maxDevices
Specifies the maximum number of devices to process per second. The default is 100.
--batch=batchSize
Specifies the number of devices to process per SubMan API call. The default is 20.

Delete Gx Sessions

delete_sessions.py -s Gx -f /inputFiles/device_ids.txt -t AccessNumber -v

Delete Sy Sessions 0:1:5:3 and 0:1:5:5

delete_sessions.py -s Sy 0:1:5:3 0:1:5:5