Good afternoon,
while setting up a Scheduled Task policy I specified:
1. an instance parameter NODE_NAME
2. another parameter PORT
as Task type in the policy I am using Perl script.
I assigned the policy to the node with an agent and defined 3 instances, for simplicity:
[instance 1]
NODE_NAME = serverA
PORT = 123
[instance 2]
NODE_NAME = serverB
PORT = 456
[instance 3]
NODE_NAME = serverC
PORT = 789
I would want to process each instance separately inside the perl script embedded in the Scheduled Task policy.
My impression was that inside the embedded script I should be able to obtain all of the instance parameter values using something like:
my $node_names_str = $OVOSystem->ParameterGetString("NODE_NAME", "%%NODE_NAME%%");
`/opt/microfocus/usr/lpp/OV/bin/ovlogmsg -w -a "System" -c "TEST" -msg "$node_names_str" -t`; <- outputs collected parameter values to System.txt
Unfortunately, $node_names_str will always contain only the value of the first instance, second and third is never obtained. This is also seen in the translated policy <id>_data.xml file, where the part '%%NODE_NAME%%' is replaced with 'serverA' - subsequent calls to $OVOSystem->ParameterGetString("NODE_NAME", "%%NODE_NAME%%"); will also yield the first instance value.
Would you please happen to know, whether there is some way to iterate over the instance values inside the embedded perl script, so that I can process all of the instances there?
Please note that I specifically wish to work with instance parameters as these are easier to read and provide better overview than setting non-instance parameter with values separated by commas such as "serverA, serverB, serverC" - this is not plausible.