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.

How to use this snippet:

% python -h                                                      
usage: [-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 Found
Published Jan 09, 2021
Version 1.0

Was this article helpful?

No CommentsBe the first to comment