python f5-vserver-tool

Problem this snippet solves:

What the tool does:

  • List all virtual server, nodes and pools and their assignment for a big-ip system or device group
  • print sync status of a device group
  • assign a pool for a specific virtual server

How to use this snippet:

Usage

https://github.com/FalcoSuessgott/f5-vserver-tool

Print out information

List virtual server and their assigned pools and their respective nodes

[user@host ~]$ loadbalancer -l
    Password:
    Virtual Server               Pool               Pool member
    xxx-8010                     xxxx               1.1.1.1:100, 1.1.1.1:200
    xxx-8020                     xxxx               1.1.1.1:100, 1.1.1.1:200
    ....`

List all virtual server

[user@host ~]$ loadbalancer --list-vserver
    Password:
    vserver-1
    vserver-2
    vserver-3
    ....`        

List all pools

[user@host ~]$ loadbalancer --list-pools
    Password:
    pool-1
    pool-2
    pool-3
    ....

List all nodes

[user@host ~]$ loadbalancer --list-nodes
    Password:
    node1
    node2
    node3
    ....

List all virtual server

[user@host ~]$ loadbalancer --list-vserver
    Password:
    vserver-1
    vserver-2
    vserver-3
    ....

Print out sync-status

[user@host ~]$ loadbalancer --show-sync-status
    Password: 
    deviceGroup is currently In Sync

Set assign pool1 to vserver1

[user@host ~]$ loadbalancer -s vserver1 pool1
    Password: 
    Changing pool for "vserver1" to "pool1"
    Synchronizing new configuration to device group "devicegroup"
    devicegroup is In Sync

Print out sample config file

[user@host ~]$ loadbalancer -m
        [AUTH]
        user        = "user"
        password    = "password"

        [BASIC]
        devicegroup = "devicegroup"
        loadbalancer    = "fqdn"

Code :

https://github.com/FalcoSuessgott/f5-vserver-tool
Updated Jun 06, 2023
Version 2.0
No CommentsBe the first to comment