Is using nsh/nexec with an ls/dir-command an opportunity?
open nsh prompt and execute command ls //$Target for listing of files.
Also, you can achieve same by adding NSH script in depot and and create NSH job using script and execute on target.
e.g Check existance of file.
nexec $host ls /usr/local/nsh_local_agent/
# Or you can use
# ls //$host/usr'local/nsh_local_agent/
if [ $? -eq 0 ];then
echo "nsh_local_agent is installed on Machine: $host"
echo "nsh_local_agent is not installed on Machine: $host"
I saw your original posting in the BAO communities and see that you have deleted that posting. I was going to suggest to look at BL's commandline capabilities first. If its achievable via blcli or NSH then BAO can utlize that to accomplish what you're looking for.
Many thanks for your anwers!
Using NSH or any other method is fine for me. But the "Applications" folder was just an example.
Let me try to explain in more detail what I want to achieve:
The final goal is to do a tree search on the UCS. So I would like to query the object "Blades" and as a result I would like to geht "blade-1", "blade-2", "blade-5" and "blade-6".
So the whole query would be to query "CaliforniaManager" and receive all child objects. Then query each of them to get all chassis. Then to query each chassis to get the included blade servers. And finally query each blade server to get the object properties (memory, CPUs, ...)
In the meantime I got the hint to use the following command:
blcli -v BLCLI -r BLAdmins Get /group/Servers/Customer_xxx/xxx/Assets/CaliforniaManager/172.16.227.10/ChassisGroup/chassis-1/Blades
With this command I get the properties of the Blades object.
blcli -v BLCLI -r BLAdmins Get /group/Servers/Customer_xxx/xxx/Assets/CaliforniaManager/172.16.227.10/ChassisGroup/chassis-1/Blades/blades-1
This gives me th properties of the blade itself.
Now I'm looking for the tree search capability.
Many thanks in advance!
1 of 1 people found this helpful
please check nexec $host ls /Path/Blades is giving you list of all Blades.
And, use following NSH script format for tree search
# Get child count
Blade_cnt=`nexec $host ls /Path/Blades | wc -l`
while $Blade_cnt -ge 1
# Get Child name
Blade_child=`nexec $host ls /Path/Blades | head -n $Blade_cnt | tail -n 1`
#Use your BLCLI's to get property and other things
#Use Blade_child variable instead of blades-1, blades-2 etc.
# e.g blcli -v BLCLI -r BLAdmins Get /group/Servers/Customer_xxx/xxx/Assets/
# do any other object property operation as per your requirement
Blade_cnt=`expr $Blade_cnt - 1`
Many thanks to all for your feedback.
Unfortunately we noticed additional areas where we have troubles when we do the integration via BSA, so we decided to integrate diretlcy into the UCS, instead of going bia BSA.
Nevertheless many thanks for your support!