mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Refactors bigip_virtual_server (#34412)
This refactors the bigip_virtual_server module to address several issues and missing features. Additionally it adds tests and updates the coding standards to the recent version used by f5. Finally, it removes deprecated items that were announced in 2.4
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"kind": "tm:ltm:virtual:virtualstate",
|
||||
"name": "my-virtual-server",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/my-virtual-server",
|
||||
"generation": 65,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server?ver=12.1.2",
|
||||
"addressStatus": "yes",
|
||||
"autoLasthop": "default",
|
||||
"cmpEnabled": "yes",
|
||||
"connectionLimit": 0,
|
||||
"destination": "/Common/10.10.10.10:443",
|
||||
"enabled": true,
|
||||
"gtmScore": 0,
|
||||
"ipProtocol": "any",
|
||||
"mask": "255.255.255.255",
|
||||
"mirror": "disabled",
|
||||
"mobileAppTunnel": "disabled",
|
||||
"nat64": "disabled",
|
||||
"rateLimit": "disabled",
|
||||
"rateLimitDstMask": 0,
|
||||
"rateLimitMode": "object",
|
||||
"rateLimitSrcMask": 0,
|
||||
"serviceDownImmediateAction": "none",
|
||||
"source": "0.0.0.0/0",
|
||||
"sourceAddressTranslation": {
|
||||
"type": "automap"
|
||||
},
|
||||
"sourcePort": "preserve",
|
||||
"synCookieStatus": "not-activated",
|
||||
"translateAddress": "enabled",
|
||||
"translatePort": "enabled",
|
||||
"vlansDisabled": true,
|
||||
"vsIndex": 2,
|
||||
"policiesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/policies?ver=12.1.2",
|
||||
"isSubcollection": true
|
||||
},
|
||||
"profilesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles?ver=12.1.2",
|
||||
"isSubcollection": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"kind": "tm:ltm:virtual-address:virtual-addressstate",
|
||||
"name": "10.10.10.10",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/10.10.10.10",
|
||||
"generation": 116,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual-address/~Common~10.10.10.10?ver=12.1.2",
|
||||
"address": "10.10.10.10",
|
||||
"arp": "enabled",
|
||||
"autoDelete": "true",
|
||||
"connectionLimit": 0,
|
||||
"enabled": "yes",
|
||||
"floating": "enabled",
|
||||
"icmpEcho": "enabled",
|
||||
"inheritedTrafficGroup": "false",
|
||||
"mask": "255.255.255.255",
|
||||
"routeAdvertisement": "enabled",
|
||||
"serverScope": "any",
|
||||
"spanning": "disabled",
|
||||
"trafficGroup": "/Common/traffic-group-1",
|
||||
"trafficGroupReference": {
|
||||
"link": "https://localhost/mgmt/tm/cm/traffic-group/~Common~traffic-group-1?ver=12.1.2"
|
||||
},
|
||||
"unit": 1
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"kind": "tm:ltm:virtual:virtualstate",
|
||||
"name": "my-virtual-server",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/my-virtual-server",
|
||||
"generation": 152,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server?ver=12.1.2",
|
||||
"addressStatus": "yes",
|
||||
"autoLasthop": "default",
|
||||
"cmpEnabled": "yes",
|
||||
"connectionLimit": 0,
|
||||
"destination": "/Common/10.10.10.10:443",
|
||||
"enabled": true,
|
||||
"gtmScore": 0,
|
||||
"ipProtocol": "any",
|
||||
"mask": "255.255.255.255",
|
||||
"mirror": "disabled",
|
||||
"mobileAppTunnel": "disabled",
|
||||
"nat64": "disabled",
|
||||
"rateLimit": "disabled",
|
||||
"rateLimitDstMask": 0,
|
||||
"rateLimitMode": "object",
|
||||
"rateLimitSrcMask": 0,
|
||||
"serviceDownImmediateAction": "none",
|
||||
"source": "0.0.0.0/0",
|
||||
"sourceAddressTranslation": {
|
||||
"type": "automap"
|
||||
},
|
||||
"sourcePort": "preserve",
|
||||
"synCookieStatus": "not-activated",
|
||||
"translateAddress": "enabled",
|
||||
"translatePort": "enabled",
|
||||
"vlansDisabled": true,
|
||||
"vsIndex": 19,
|
||||
"vlans": [
|
||||
"/Common/net1"
|
||||
],
|
||||
"vlansReference": [
|
||||
{
|
||||
"link": "https://localhost/mgmt/tm/net/vlan/~Common~net1?ver=12.1.2"
|
||||
}
|
||||
],
|
||||
"policiesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/policies?ver=12.1.2",
|
||||
"isSubcollection": true
|
||||
},
|
||||
"profilesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles?ver=12.1.2",
|
||||
"isSubcollection": true,
|
||||
"items": [
|
||||
{
|
||||
"kind": "tm:ltm:virtual:profiles:profilesstate",
|
||||
"name": "fastL4",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/fastL4",
|
||||
"generation": 148,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles/~Common~fastL4?ver=12.1.2",
|
||||
"context": "all",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/profile/fastl4/~Common~fastL4?ver=12.1.2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
115
test/units/modules/network/f5/fixtures/load_ltm_virtual_3.json
Normal file
115
test/units/modules/network/f5/fixtures/load_ltm_virtual_3.json
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"kind": "tm:ltm:virtual:virtualstate",
|
||||
"name": "my-virtual-server",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/my-virtual-server",
|
||||
"generation": 340,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server?expandSubcollections=true&ver=12.0.0",
|
||||
"addressStatus": "yes",
|
||||
"autoLasthop": "default",
|
||||
"cmpEnabled": "yes",
|
||||
"connectionLimit": 0,
|
||||
"description": "Test Virtual Server",
|
||||
"destination": "/Common/10.10.10.10:443",
|
||||
"enabled": true,
|
||||
"gtmScore": 0,
|
||||
"ipProtocol": "tcp",
|
||||
"mask": "255.255.255.255",
|
||||
"mirror": "disabled",
|
||||
"mobileAppTunnel": "disabled",
|
||||
"nat64": "disabled",
|
||||
"rateLimit": "disabled",
|
||||
"rateLimitDstMask": 0,
|
||||
"rateLimitMode": "object",
|
||||
"rateLimitSrcMask": 0,
|
||||
"serviceDownImmediateAction": "none",
|
||||
"source": "0.0.0.0/0",
|
||||
"sourceAddressTranslation": {
|
||||
"type": "automap"
|
||||
},
|
||||
"sourcePort": "preserve",
|
||||
"synCookieStatus": "not-activated",
|
||||
"translateAddress": "enabled",
|
||||
"translatePort": "enabled",
|
||||
"vlansDisabled": true,
|
||||
"vsIndex": 38,
|
||||
"rules": [
|
||||
"/Common/web_logging"
|
||||
],
|
||||
"rulesReference": [
|
||||
{
|
||||
"link": "https://localhost/mgmt/tm/ltm/rule/~Common~web_logging?ver=12.0.0"
|
||||
}
|
||||
],
|
||||
"policiesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/policies?ver=12.0.0",
|
||||
"isSubcollection": true,
|
||||
"items": [
|
||||
{
|
||||
"kind": "tm:ltm:virtual:policies:policiesstate",
|
||||
"name": "policy1",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/policy1",
|
||||
"generation": 340,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/policies/~Common~policy1?ver=12.0.0",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/policy/~Common~policy1?ver=12.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"profilesReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles?ver=12.0.0",
|
||||
"isSubcollection": true,
|
||||
"items": [
|
||||
{
|
||||
"kind": "tm:ltm:virtual:profiles:profilesstate",
|
||||
"name": "clientssl",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/clientssl",
|
||||
"generation": 338,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles/~Common~clientssl?ver=12.0.0",
|
||||
"context": "clientside",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/profile/client-ssl/~Common~clientssl?ver=12.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "tm:ltm:virtual:profiles:profilesstate",
|
||||
"name": "http",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/http",
|
||||
"generation": 338,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles/~Common~http?ver=12.0.0",
|
||||
"context": "all",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/profile/http/~Common~http?ver=12.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "tm:ltm:virtual:profiles:profilesstate",
|
||||
"name": "tcp",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/tcp",
|
||||
"generation": 338,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles/~Common~tcp?ver=12.0.0",
|
||||
"context": "clientside",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/profile/tcp/~Common~tcp?ver=12.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "tm:ltm:virtual:profiles:profilesstate",
|
||||
"name": "tcp-legacy",
|
||||
"partition": "Common",
|
||||
"fullPath": "/Common/tcp-legacy",
|
||||
"generation": 338,
|
||||
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~my-virtual-server/profiles/~Common~tcp-legacy?ver=12.0.0",
|
||||
"context": "serverside",
|
||||
"nameReference": {
|
||||
"link": "https://localhost/mgmt/tm/ltm/profile/tcp/~Common~tcp-legacy?ver=12.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user