Any python experts out there? - parsing tmsh list
Hi,
For a documation exercise i'm trying to parse the output of "tmsh list" - it's been suggested that this is a good output to identify the config of the f5.
I've choosen to use python as its native on my server i run other things on.
What i am trying to do is firstly. Split the string at the first { and then using space limitation separate this so i can see the config being identifed.
Where i am struggling is how to split up the contents of the {} brackets and split this up into key:value pairs so i can then use this infomation in the documenation.
Has anyone ever done this? Or can lend me any advise please? I'm not really a coder, more of a hacker when it comes to programming!
ltm virtual virtualServer { creation-time 2022-06-23:11:02:34 destination 172.16.100.102:http ip-protocol tcp last-modified-time 2022-06-23:11:11:50 mask 255.255.255.255 pool SiteA-Pool profiles { http { } tcp { } } serverssl-use-sni disabled source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vs-index 6 }