05-25-2021 11:54 AM
using XMC execute CLI commands …
searching for a command which makes a pause between 2 commands like:
show port X error no-refresh
pause 10
show port X error no-refresh
(sleep X or time.sleep X from XMC scripting does not work!)
Any ideas ?
Solved! Go to Solution.
05-26-2021 05:31 AM
Hello Matthias,
you can't switch to TCL in CLI Command, that's correct. As far as I know CLI Command is a plain command input option without an intepreter, therefore you have to switch to task an TCL.
But as I wrote in difference to python no further code is necessary (only three lines from your example) therefore the code part is not realy complexe only the menus to start a script and select an name and usergroup is more complexe.
05-26-2021 05:31 AM
Hello Matthias,
you can't switch to TCL in CLI Command, that's correct. As far as I know CLI Command is a plain command input option without an intepreter, therefore you have to switch to task an TCL.
But as I wrote in difference to python no further code is necessary (only three lines from your example) therefore the code part is not realy complexe only the menus to start a script and select an name and usergroup is more complexe.
05-26-2021 05:17 AM
Hi Stephan,
i cannot select TCL in a CLI Command Task. If yes how ?
Switch over to Tasks - add script … this enters the compexity of scripts … (if i do that i use python - time.sleep X)
It seems XMC cannot handle this at this point.
BR,
Matthias
05-25-2021 06:19 PM
Hello Matthias,
TCL is the trick. You have to hide your “sleep X” command from the switch CLI.
Therefore select TCL (not CLI) and use (for a test):
show time
sleep 15
show time
Should work fine.
05-25-2021 12:35 PM
You are right but python scripts are too complicated for much customers/users.
So i am looking for a way with the easy “Executing CLI commmads”.
As a workaround sometimes i use a “save config” but this is not very smart.
Your approach is much more smart, but works only on EXOS - no VSP, no EOS, …