Synopsis: This sample script allows user to perform bulk insert/update/delete of Jabber Guest Links

Usage: jg_links.py [-h] -u USERNAME -p PASSWORD -s SERVER -f FILENAME [-t {XML,CSV}] -m {I,U,D,O}

-h, --help show this help message and exit
-u USERNAME admin username
-p PASSWORD admin password
-s SERVER Jabber Guest server name or IP address
-f FILENAME Filename with links to insert
-t {XML,CSV} File format XML or CSV (optional, default to CSV)
-m {I,U,D,O} Insert, Update, Delete links, or Output to file

1. To dump all links from system to 'olinks.csv' file in CSV format

This command can be used to backup all links

# python jg_links.py -u davidn -p cisco123 -s 10.93.229.6 -f olinks.csv -m O

2. To delete all links from 'dlinks.csv'

# python jg_links.py -u davidn -p cisco123 -s 10.93.229.6 -f dlinks.csv -m D

3. To update all links from 'mlinks.csv'

# python jg_links.py -u davidn -p cisco123 -s 10.93.229.6 -f mlinks.csv -m U

4. To insert all links from 'ilinks.csv'

# python jg_links.py -u davidn -p cisco123 -s 10.93.229.6 -f ilinks.csv -m I

Script supports both XML(-t XML) and CSV format, also can create link files in both format. This script had been tested with Python 2.7. Required python module: requests

If you have pip module installed, simply run:

# pip install requests

Or follow instructions from download page to install the module.

Disclaimer: Pursuant to the Jabber SDK License Agreement, this component of the SDK is Redistributable when incorporated into a Developer Application.