Tools are provided to provision and verify data mappings for the LocationBasedDialling feature.

lbd-provision

This tool takes a .csv file as input and populates the location_based_dialling_data_3gpp table in Cassandra with the data.

Mandatory Arguments What it specifies
 -c

Comma separated list of Cassandra contact points.

Optional Arguments

What it specifies

 -p

Cassandra port (defaults to 9042 if omitted).

 -f

Input CSV file.

 -d

Dryrun, no data in Cassandra will be modified.

 -i

Reset, Cassandra data will be overwritten with input file.

 -b

Rollback, second most recent stored data will be restored.

 -h

Help

The input CSV file must be comma separated with no header row. Each line should be in the following format <cell-id>,<dialled-number>,<destination-number>. Whitespaces and empty lines are ignored. Valid characters for dialled-number and destination-number entries are: 0-9, #, and *.

lbd-provision will fetch the existing data in cassandra and perform a diff with the content of the input CSV file. New entries in the input file not present in the database are added. Current entries not in the input file are removed. If the -i option is used, all data is overwritten with the content of the input file.

Each time lbd-provision is run the dataset is stored in the location_based_dialling_uploaded_files table. The -b option can be used to rollback to the previous data set. The location_based_dialling_uploaded_files table has to have been loaded with previous runs of lbd-provision before rollback can be used. If -b is run twice, the original record set is returned, so effectively it toggles between the current and previous data sets. If the -b option is not used, -f must be provided.

Here is an example:

$ cat lbd-provision-test-data.csv
testdata0,717,4165550000
testdata1,718,4165550001
testdata2,719,4165550002
$
$ ./lbd-provision -c localhost -f lbd-provision-test-data.csv -i
Saving Cassandra contact points: localhost
Saving input file: /home/ubuntu/lbd-provision-test-data.csv
Setting reset flag
Connected to Cassandra
Sorted file to: /home/ubuntu/work/input-sorted.csv
Processing input file to update Cassandra: /home/ubuntu/work/input-sorted.csv
Creating entry: testdata0,717,4165550000
Creating entry: testdata1,718,4165550001
Creating entry: testdata2,719,4165550002
Removing all data from table: location_based_dialling_data_3gpp
Creating data in: location_based_dialling_data_3gpp
Updated Cassandra with entire input file
Not deleting old rows as less than 3 files saved

SUCCESS
Note The lbd-provisioning tool can provision up to 5 million rows. Functionality beyond this number of rows is not supported.

lbd-verify

This tool queries the existing data in Cassandra and the Vertical Service Code profiles in Rhino and checks that each entry exists in both places.

Mandatory Arguments What it specifies
 -c

Comma separated list of Cassandra contact points.

 -r

Rhino client directory.

Optional Arguments

What it specifies

 -p

Cassandra port (defaults to 9042 if omitted).

 -h

Help

Here is an example:

$ ./lbd-verify -c localhost -r RhinoSDK/client
Saving Cassandra contact points: localhost
Saving rhino client: /home/ubuntu/RhinoSDK/client
Connected to Cassandra
Found dialled number: 717
Found dialled number: 718
Found dialled number: 719
Found platformOperator: Metaswitch
Found address: 718
Found address: 717
Found address: 719

SUCCESS: All data in Cassandra and profiles matches
Previous page Next page
Sentinel VoLTE Version 4.1