How to write loops in patterns?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 03:55 AM
I have list of entries in pattern table variable. The requirement is to loop through each table entry and run a command i.e. 'Parse Command output' and then store the result. How do I put a loop around a pattern step ?
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 09:57 AM
simple as running..
'command' table.value[*]
This will run the command for each entry in the table you created in the prior step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2019 09:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2019 10:05 AM
Hey Patrick,
Yeah I was wrong on this one, thought it would be as simple as that but it isnt, it doesn't work that way. I checked with the folks upstairs and seems you can (or have to) do this in a eval script. If you take a look at the f5 BigIP LTM pattern, in the connections section at the bottom, step 23.1 is a good example of how to loop through a table (pools) and run the command you want from them...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2019 12:05 PM
Thanks Doug!
This indeed did it for me, using the CTX in a Transform Table to execute a shellCommand.
Cheers, Patrick