Hey Ottleydamian,
As I already said in my previous post, iCall is unfortunately not the right choice for your scenario.
The problem with iCall in its current form is, that you can't syncronouly trigger an iCall script out of an iRule, while passing parameters/variables to the script execution and to get return information back once the script is executed.
iCall is basically an asyncronouly operating framework which can trigger based on time, log events and ISTATS statistic counters. iCall has some awesome usecases, but in your specific scenario it would be a rather poor choice:
- Triggering iCall scripts out of an iRule via iRule generated log-lines does not support to pass parameters based on dynamic information found in the log line itself (e.g. which NODE to add?). The executed iCall script would need to read the entire log file to begin with and extract the NODE information out of the individual log lines that may have triggered this script. You would need to implement a custom machanism to track which log lines have already been processed by previous iCall executions and which are outstanding. Kind of nightmare...
- Triggering iCall scripts out of an iRule via ISTATS counter values adds unfortunately some delay till ISTATS collects and updates the counters (highly asynchronous) and you get no response back when the node has been added. So the iRule would need to HOLD the ongoing HTTP request and continiously check if the iCall script has already been added the pool members. In addition, you would be forced to implement some queuing logic, to support concurrent client side requests for new node objects. This is way to complex...
As I already said, it's far more elegant to make a syncronous SIDEBAND request to the REST-API and execute a TMSH script, pass the NODE info via additional parameters, wait for the REST-API response and evaluate the return'ed information.
PoC for changing DATA-GROUPS via TMSH Scripts out of an iRule via REST-API calls.
https://devcentral.f5.com/questions/write-into-internal-data-group-from-irule-50597
This may be usefull if you want to execute BASH commands (including native TMSH commands) out of an iRule via REST-API calls.
https://devcentral.f5.com/questions/running-bash-commands-via-rest-api-51527
Cheers, Kai