F5 Network Map to Json with Python

Code is community submitted, community supported, and recognized as ‘Use At Your Own Risk’.

Short Description

With this code, you can obtain your network map, and save it a json file.

Problem solved by this Code Snippet

By default capabilities of IControl Api, you can not obtain Network Map with a single api call(at least,for now), with this code, you can get it with several api calls, and code will converge the data for you.

How to use this Code Snippet

For using this code, first, you have to have an access to your F5 over tcp/443 from where you run the code on,

After you become sure the reachibility, you can give it a try with changing the line with proper informations:

sampleF5 = F5_LoadBalancer("F5_ManagementIpAddress","Username","Password")

After that, you can run this code, 

If you get no error, you will see a file named with "networkMap.json" in the working directory of this code,

If you want to change name of output file from "networkMap.json" to anyting, you can give it as a parameter,

sampleF5.buildJsonNetworkMap(nameOfFile = "AnyNameYouWant.json")

Code Snippet Meta Information

  1. Version: 1.0
  2. Coding Language: Python

Full Code Snippet

Github Repo For F5NetworkMapper 

Published Nov 28, 2022
Version 1.0

Was this article helpful?

No CommentsBe the first to comment