scottdware / go-bigip

A Go package that interacts with F5 BIG-IP systems using the REST API.
MIT License
109 stars 119 forks source link

issues-85: ltm updatepoolmembers as PATCH not PUT #86

Closed glennmolsen closed 5 years ago

glennmolsen commented 5 years ago

ltm.UpdatePoolMembers replaces existing pool member info correctly but also resets all other pool properties to default values. For example, if you had a health monitor applied to the pool before, after calling UpdatePoolMembers, membership is correct but monitor is now none. This would apparently be due to the call being a PUT rather than a PATCH.

Updating UpdatePoolMembers to use PATCH fixes the problem. Pool membership is completely replaced based on the config argument. No other pool property is effected by the operation -- that use case is covered by ltm.ModifyPool() .

hoffmanntravis commented 5 years ago

I have run into a similar issue with updating ModifyServerSSLProfile() / ModifyClientSSLProfile() as well. +1 for this, and probably using PATCH instead of PUT in many if not all cases. I'm not sure when a PUT would be desirable:

https://github.com/scottdware/go-bigip/issues/94

scottdware commented 5 years ago

This has been merged! Thank you for for the contribution!