Forum Discussion
How to set Default Node Monitor - Python f5-SDK
I am trying to set the default node monitor using the F5-SDK.
Here's the code I've tried
from f5.bigip import ManagementRoot
mgmt = ManagementRoot('ip address', 'user', 'password')
mgmt.tm.ltm.defaut_node_monitor.update(rule='/Common/gateway_icmp')
When navigating the API in a browser I see the default-node-monitor is a resource, the update method should work according to the SDK documentation.
https://localhost/mgmt/tm/ltm/default-node-monitor
{
kind: "tm:ltm:default-node-monitor:default-node-monitorstate",
selfLink: "https://localhost/mgmt/tm/ltm/default-node-monitor?ver=12.1.2"
}
If I change the default node monitor in the config utility and navigate the API, I notice the rule attribute for the default-node-monitor is changed
{
kind: "tm:ltm:default-node-monitor:default-node-monitorstate",
selfLink: "https://localhost/mgmt/tm/ltm/default-node-monitor?ver=12.1.2",
rule: "/Common/gateway_icmp "
}
- JRahmAdmin
the default node monitor is not an endpoint in the sdk currently, so that won't work. When we add it, the proper syntax would be:
dnodemon = mgmt.tm.ltm.default_node_monitor.load() dnodemon.rule = '/Common/gateway_icmp' dnodemon.update()
I added issue 1142 to the github repository, I'll work on it when I get a chance.
Recent Discussions
Related Content
* 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