Forum Discussion
Robert_47833
Altostratus
Jul 05, 2017how to get active ltm via python f5-sdk
self.mgmt = ManagementRoot(host, user, passwd)
self.mgmt.tm.sys.failover.load()
but I can't get active lba.
any one who has exeprience on this and share me the code?
Satoshi_Toyosa1
Jul 05, 2017Ret. Employee
I don't know the Python API but looks like you are after tmsh show sys failover. e.g.,
tmsh show sys failover
Failover active for 2d 03:22:15
If that's the case, try the following curl command to test if it actually works with the address, userID and password you specified in the code.
curl -sku user:passwd https://host/mgmt/tm/sys/failover
Example output (formatted nicely using | python -m json.tool)
{
"apiRawValues": {
"apiAnonymous": "Failover active for 2d 03:24:19\n"
},
"kind": "tm:sys:failover:failoverstats",
"selfLink": "https://localhost/mgmt/tm/sys/failover?ver=12.1.2"
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
