I have created an analysis named “foo”. It is part of the custom site “bar”
The analysis has two properties:
site tag of current site
type of current site
Oddly, it always returns:
actionsite
Master Action Site
Is there anyway for the analysis to report back that it is part of CustomSite_bar ? or “bar”
It seems counter-intuitive that an analysis which exists only as part of the custom site “bar” would report back that it is part of the Master Action Site.
All the custom Fixlets/Tasks/analyses will report that they are part of the actionsite in relevance. This is due to an implementation detail and I wouldn’t expect that these inspectors would be useful for you… What are you trying to accomplish?
I wanted to get the site name, so I could navigate into the proper directory to read a configuration file – one which is stored in (on unix systems): /var/opt/BESClient/stuff/
where stuff is my site name. I’m developing fixlets in one site, and I don’t want to have to hardcode the path of the config file – I want it to be relative to the site into which it is imported.
pathname of client folder of current site - will give you the absolute path to the current site
So, for example, if you create a test task with the following action
delete __appendfile delete /tmp/mytest.output appendfile
{name of current site
} appendfile
{pathname of client folder of current site
} appendfile
{pathname of parent folder of folder (pathname of client folder of current site)
} appendfile
{((pathname of parent folder of folder (pathname of client folder of current site)) &
"/CONFIG")
} move __appendfile /tmp/mytest.output
you should see in the /tmp/mytest.output file something like:-
BA - TEST_SITE /var/opt/BESClient/__BESData/CustomSite_BA_-2d_TEST_SITE /var/opt/BESClient/__BESData /var/opt/BESClient/__BESData/CONFIG
If I’m using a lot of directories and/or redirecting input & output I usually set the parameters at the start of the action:-
parameter
"TOPDIR" =
"{((pathname of parent folder of parent folder of folder (pathname of client folder of current site)) & "/FIM
")}" parameter
"BINDIR" =
"{(parameter "TOPDIR
") & "/bin
"}" parameter
"TMPDIR" =
"{(parameter "TOPDIR
") & "/tmp
"}" parameter
"RESDIR" =
"{(parameter "TOPDIR
") & "/results
"}" parameter
"DATDIR" =
"{(parameter "TOPDIR
") & "/data
"}"
Thanks. I’ll stop trying to use an analysis to see what the various settings are across all my clients – it seemed like that would be possible, but I’m guessing it simply can’t be done – short of using a task to write a file containing those settings into a given non-site-specific directory and then reading that in the analysis