Summary
Implement comprehensive discovery of object references within iRules. This is critical for accurate app extraction - iRules often reference other objects that need to be included when migrating configurations.
Current State
We have partial implementations that are tested but not integrated into the main extraction flow:
poolsInRule() - discovers pool references in iRules (in src/pools.ts)
digDataGroupsiniRule() - discovers data-group references (in src/digiRules.ts)
These need to be hooked into digVsConfig() in src/digConfigs.ts similar to how poolsInPolicy() is used for Local Traffic Policies.
Proposed Enhancements
| Reference Type |
iRule Example |
Priority |
| Pools |
pool /Common/my_pool |
High - have code |
| Data-groups |
class match [class lookup...] |
High - have code |
| Nodes |
node 10.1.1.1 80 |
Medium |
| Virtual servers |
virtual /Common/other_vs |
Medium |
| Other iRules |
call /Common/lib_rule |
Medium |
| iFiles |
ifile get /Common/myfile |
Medium |
| Profiles |
Less common in iRules |
Low |
Implementation Notes
- iRule parsing is complex due to TCL syntax
- Need to handle commented-out references (lines starting with
#)
- Variable-based references (e.g.,
pool $poolVar) are harder to track
- Consider searching iRules for known object names rather than regex pattern matching
Related Code
src/pools.ts - poolsInRule(), poolsInPolicy()
src/digiRules.ts - digDataGroupsiniRule()
src/digConfigs.ts - main extraction logic, lines 143-155 handle iRules
tests/025_pools.tests.ts - existing tests for pool/data-group discovery
🤖 Generated with Claude Code
Summary
Implement comprehensive discovery of object references within iRules. This is critical for accurate app extraction - iRules often reference other objects that need to be included when migrating configurations.
Current State
We have partial implementations that are tested but not integrated into the main extraction flow:
poolsInRule()- discovers pool references in iRules (insrc/pools.ts)digDataGroupsiniRule()- discovers data-group references (insrc/digiRules.ts)These need to be hooked into
digVsConfig()insrc/digConfigs.tssimilar to howpoolsInPolicy()is used for Local Traffic Policies.Proposed Enhancements
pool /Common/my_poolclass match [class lookup...]node 10.1.1.1 80virtual /Common/other_vscall /Common/lib_ruleifile get /Common/myfileImplementation Notes
#)pool $poolVar) are harder to trackRelated Code
src/pools.ts-poolsInRule(),poolsInPolicy()src/digiRules.ts-digDataGroupsiniRule()src/digConfigs.ts- main extraction logic, lines 143-155 handle iRulestests/025_pools.tests.ts- existing tests for pool/data-group discovery🤖 Generated with Claude Code