Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
code share

BIG-IP Config Cleaner

Problem this snippet solves:

This python script uses ssh/tmsh to access a BIG-IP and iterates through virtual servers looking for unused virtuals so that the virtual and associated configuration objects can be removed/cleaned from a BIG-IP system.

How to use this snippet:

Install onto a system that has python+paramiko

then execute and provide arguments.

./ssh_bigip_cleaner.py usage: ssh_bigip_cleaner.py [-h] (--scan | --remove | --scanandremove) --bigip BIGIP --user USER [--file FILE] [--vipNoDns] [--vipNoDnsVsEnabled] [--vipNoDnsVsDisabled] [--vipNoDnsVsAvailable] [--vipNoDnsVsOffline] [--vs0TotalConns] [--vs0CurConns] [--vsDisabled] [--vsOffline]

Tested on Version:
Comments on this Snippet
Comment made 01-Feb-2018 by Andy McGrath 2233

Like this, looks very good (sure will link to for an answer to two in the future), just wondering if it could be expand to uses iControl or iControl REST API instead of SSH and TMSH?

Python F5 iControl REST library

Comment made 12-Feb-2018 by Chad Jenison

The version above was actually a second revision (rewrite) of an original that used iControl REST. For the customer in question, they had software that pre-dated REST, so I rewrote it to use SSH/TMSH via paramiko at their request.

Just uploaded a version (slightly different capabilities) that uses iControl REST at: https://devcentral.f5.com/codeshare/big-ip-config-cleaner-icontrol-rest-1122