I am trying to use run-script to get IPS information on a VS of VSX. Say VS 3 on cli I could do following:
vsenv 3
ips stat
But if I put it in run-script as follow, api could not find vsenv command.
mgmt_cli -r true -d Mydomain -VSX run-script script-name test script "vsenv3; ips stat" targets.1 vsx1 -f json
Also tried to put the two commands in a script, test.sh:
#!/bin/bash
vsenv 3
ips stat
then run
mgmt_cli -r true -d Mydomain -VSX run-script script-name test script "/mydir/test.sh" targets.1 vsx1 -f json
it does not work either.
Any idea how to get this to work or any way that can get IPS info on VS?