Forum Discussion
Landono
Nimbostratus
May 05, 2015Modifying Pool Members through REST API
I'm currently modifying our script that we use to manage our LTM boxes, specifically the part that modifies and creates nodes and pools. Historically we've had the script run a variety of SSH command...
nitass
Employee
May 06, 2015can you try something like this?
rest call
[root@ve11d:Active:Changes Pending] config curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool/foo/members | /var/tmp/jq .
{
"kind": "tm:ltm:pool:members:memberscollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members?ver=11.6.0",
"items": [
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "200.200.200.101:80",
"partition": "Common",
"fullPath": "/Common/200.200.200.101:80",
"generation": 1,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members/~Common~200.200.200.101:80?ver=11.6.0",
"address": "200.200.200.101",
"connectionLimit": 0,
"dynamicRatio": 1,
"ephemeral": "false",
"fqdn": {
"autopopulate": "disabled"
},
"inheritProfile": "enabled",
"logging": "disabled",
"monitor": "default",
"priorityGroup": 0,
"rateLimit": "disabled",
"ratio": 1,
"session": "user-enabled",
"state": "unchecked"
}
]
}
[root@ve11d:Active:Changes Pending] config curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool/foo/members -X POST -H "Content-Type: application/json" -d '{"name":"200.200.200.111:80"}' | /var/tmp/jq .
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "200.200.200.111:80",
"fullPath": "200.200.200.111:80",
"generation": 9,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members/200.200.200.111:80?ver=11.6.0"
}
[root@ve11d:Active:Changes Pending] config curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool/foo/members | /var/tmp/jq .
{
"kind": "tm:ltm:pool:members:memberscollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members?ver=11.6.0",
"items": [
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "200.200.200.101:80",
"partition": "Common",
"fullPath": "/Common/200.200.200.101:80",
"generation": 1,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members/~Common~200.200.200.101:80?ver=11.6.0",
"address": "200.200.200.101",
"connectionLimit": 0,
"dynamicRatio": 1,
"ephemeral": "false",
"fqdn": {
"autopopulate": "disabled"
},
"inheritProfile": "enabled",
"logging": "disabled",
"monitor": "default",
"priorityGroup": 0,
"rateLimit": "disabled",
"ratio": 1,
"session": "user-enabled",
"state": "unchecked"
},
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "200.200.200.111:80",
"partition": "Common",
"fullPath": "/Common/200.200.200.111:80",
"generation": 9,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members/~Common~200.200.200.111:80?ver=11.6.0",
"address": "200.200.200.111",
"connectionLimit": 0,
"dynamicRatio": 1,
"ephemeral": "false",
"fqdn": {
"autopopulate": "disabled"
},
"inheritProfile": "enabled",
"logging": "disabled",
"monitor": "default",
"priorityGroup": 0,
"rateLimit": "disabled",
"ratio": 1,
"session": "user-enabled",
"state": "unchecked"
}
]
}
tmsh
[root@ve11d:Active:Changes Pending] config tmsh list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
200.200.200.111:80 {
address 200.200.200.111
}
}
}
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