/f5_set_pool_members

python script to change the status of a pool members on F5 using the F5 iControl® REST Python API

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

f5_set_pool_members

python script to change the status of a pool members on F5 using the F5 iControl® REST Python API

Install

Clone

git clone git@github.com:lgaggini/f5_set_pool_members.git

Requirements

pip install -r requirements.txt

Configuration

Configure your credentials and your endpoint in a settings file which will be included.

ENDPOINT='my.endpoint.it'
USER='myuser'
PASS='mypass'

You have also to configure a list of available pools to choose from, to prevent random pool damages.

POOLS=['mysafepool1', 'mysafepool2']

Usage

usage: f5_set_pool_members.py [-h] -p {popper-stag-priv-http} -s
                              {enabled,disabled,forced_offline} [-r]

enables, disables and forces offline f5 pools members

optional arguments:
  -h, --help            show this help message and exit
  -p {popper-stag-priv-http}, --pool {popper-stag-priv-http}
                        pool to work with
  -s {enabled,disabled,forced_offline}, --state {enabled,disabled,forced_offline}
                        pool to work with
  -r, --readonly        readonly mode for debug (default disabled)