Updates and refactors the bigip pool module to use REST (#25234)

This patch updates the bigip_pool module to use F5's REST API
as well as includes unit tests.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_pool.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_pool/tasks
This commit is contained in:
Tim Rupp
2017-06-06 10:54:02 -07:00
committed by John R Barker
parent 855fd98be6
commit 6f2c543a33
4 changed files with 1270 additions and 425 deletions

View File

@@ -0,0 +1,32 @@
{
"kind": "tm:ltm:pool:poolstate",
"name": "test_pool",
"partition": "Common",
"fullPath": "/Common/test_pool",
"generation": 1452,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test_pool?ver=11.5.4",
"allowNat": "yes",
"allowSnat": "yes",
"description": "test",
"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",
"monitor": "min 1 of { /Common/http /Common/inband }",
"queueDepthLimit": 0,
"queueOnConnectionLimit": "disabled",
"queueTimeLimit": 0,
"reselectTries": 0,
"serviceDownAction": "reselect",
"slowRampTime": 10,
"membersReference": {
"link": "https://localhost/mgmt/tm/ltm/pool/~Common~test_pool/members?ver=11.5.4",
"isSubcollection": true
}
}

View File

@@ -0,0 +1,21 @@
[
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "1.1.1.1:80",
"partition": "Common",
"fullPath": "/Common/1.1.1.1:80",
"generation": 1,
"selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test_pool/members/~Common~1.1.1.1:80?ver=11.5.4",
"address": "1.1.1.1",
"connectionLimit": 0,
"dynamicRatio": 1,
"inheritProfile": "enabled",
"logging": "disabled",
"monitor": "default",
"priorityGroup": 0,
"rateLimit": "disabled",
"ratio": 1,
"session": "user-disabled",
"state": "up"
}
]