I was wondering if it were possible to send an array of members as opposed to adding one at a time.
i might be wrong but i think we have to send to pool url (instead of members url); however, as you know, it will overwrite the members list.
[root@ve11c:Active:In Sync] images 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": 9,
"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@ve11c:Active:In Sync] images curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool/foo -H "Content-Type: application/json" -X PUT -d '{"members":[{"name":"200.200.200.111:80"},{"name":"200.200.200.102:80"}]}' | /var/tmp/jq .
{
"kind": "tm:ltm:pool:poolstate",
"name": "foo",
"fullPath": "foo",
"generation": 10,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo?ver=11.6.0",
"allowNat": "yes",
"allowSnat": "yes",
"ignorePersistedWeight": "disabled",
"ipTosToClient": "pass-through",
"ipTosToServer": "pass-through",
"linkQosToClient": "pass-through",
"linkQosToServer": "pass-through",
"loadBalancingMode": "round-robin",
"minActiveMembers": 0,
"minUpMembers": 0,
"minUpMembersAction": "failover",
"minUpMembersChecking": "disabled",
"queueDepthLimit": 0,
"queueOnConnectionLimit": "disabled",
"queueTimeLimit": 0,
"reselectTries": 0,
"serviceDownAction": "none",
"slowRampTime": 10,
"membersReference": {
"link": "https://localhost/mgmt/tm/ltm/pool/~Common~foo/members?ver=11.6.0",
"isSubcollection": true
}
}
[root@ve11c:Active:Not All Devices Synced] images 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.102:80",
"partition": "Common",
"fullPath": "/Common/200.200.200.102:80",
"generation": 10,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/foo/members/~Common~200.200.200.102:80?ver=11.6.0",
"address": "200.200.200.102",
"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": 10,
"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"
}
]
}
[root@ve11c:Active:In Sync] images tmsh list ltm pool foo
ltm pool foo {
members {
200.200.200.102:80 {
address 200.200.200.102
}
200.200.200.111:80 {
address 200.200.200.111
}
}
}