this is a local extended object (in the template) or global ?
It is local Extended Object
don't use 'TARGET', just use the local property name in the template/component you want to pass.
Typically hostname is required for scriptutil. Component doesn’t have property which holds a servername/hostname. Even I tried adding local property to hold server hostname but when ??ApacheBaseDir?? is passed to scriptutils; Positional parameter $1 returns empty.
yeah - you're right - you need the target.
your property name is ApacheBaseDir or APACHEBASEDIR or something else?
what is the discovery condition on the template ?
what is the value of ApacheBaseDir on your component ?
I think I found what is the issue
Component Live browse EO and Compliance job works as expected. It is not working in Test Rule Editor.
does it work w/ the actual discovery job ?
We are using NSH Script job for discovering components.
what is the actual rule that isn't working?
Is it actually failing to execute or just returning the wrong result?
It is working in compliance job but not working in test rule Editor
Maybe it’s not resolving the property values ?
It is resolving the properties but in Test Rule it is failing. You can try a simple Test below scenario.
Create Component template with two local properties 1) instance_name 2) Home_dir . Manually add same server with different instances like Component name (ServerA) - inst1 and Component name (ServerA) - inst2.
set the default values
write a simple EO using scriptutil which will simple accept these properties and it will echo the value as some xml tag
scriptutil -h ??host.name?? -s eo_file -x ??Home_dir?? -d /opt/bmc/rscd_stage
Write siple compliance rule to test value returned by EO is /opt/app/inst2. Ideally instance 2 component should be compliant and instance 1 is Non compliant.
It works in compliance job but when we try to test this compliance rule in Rule editor it fails for the second component.