f5devcentral / f5-corkscrew

TMOS parser and application extractor
Apache License 2.0
14 stars 3 forks source link

[rfe] add support for extracting data-groups in iRules #10

Closed DumpySquare closed 3 years ago

DumpySquare commented 3 years ago

data group usage in irules is rather common for managing information used to control an irule.

official documentation has an irule with the following structure. Should be able to regex 'class match' * '(eguals|begins_with|contains|...)' \w (\s]}) or something like that.

when CLIENT_ACCEPTED { if { [class match [IP::remote_addr] equals aol] } { pool aol_pool } else { pool all_pool } }

https://techdocs.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/bigip-system-irules-concepts-11-6-0/6.html

Option 2 is to search each irule for a list of pools/data-groups/nodes/... since we would already have those lists as part of the extraction process. this route, seems to be more resource intensive, but seems far less error prone since these objects can be referenced in many different ways in an irule. It seems easier to search an irule for a value, than to try to find a variable that can be constructed in many ways...

https://devcentral.f5.com/s/articles/intermediate-irules-data-groups-20430 https://devcentral.f5.com/s/articles/v11-irules-data-group-updates

DumpySquare commented 3 years ago

added in v0.8 released today