Managing Subsets of Data-Group Records with BIGREST
Problem this snippet solves:
This script uses iControl REST with the options query parameter to pass records data to the tmsh command for data-groups so individual records can be added/modified/removed since the records themselves are not a subcollection.
There are two versions of this script, one requiring a tmsh script, and one without. The only without is the recommended path, but I include both here for educational purposes on how one might use tmsh scripts and iControl REST in other projects.
- Update records natively with the ltm/data-group/internal endpoint
- Update records with tmsh script with the cli/script endpoint
How to use this snippet:
% python dgmgmt.py -h
usage: dgmgmt.py [-h] host user {add,modify,delete} datagroup dgvalues
positional arguments:
host BIG-IP IP/FQDN
user BIG-IP Username
{add,modify,delete} add | modify | delete
datagroup Data-Group name you wish to change
dgvalues Key or KV Pairs, in this format: "k1,k2,k3=v3,k4=v4,k5"
optional arguments:
-h, --help show this help message and exit
Tested this on version:
No Version FoundPublished Jan 09, 2021
Version 1.0JRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.JRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.No CommentsBe the first to comment
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)