How can I print a message after executing an .xsf script?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-09-2016 05:42 PM
I am given some .xsf scripts that I just load using the
load script scriptName.xsf
The scripts do not print out anything. If possible I'd like to see a message printed after the execution like
Done! Is it possible? It should be very simple but I cannot find any commands which print out messages in the manual. I tried
echo
but it is not supported. Is there a guide to .xsf scripting?
load script scriptName.xsf
The scripts do not print out anything. If possible I'd like to see a message printed after the execution like
Done! Is it possible? It should be very simple but I cannot find any commands which print out messages in the manual. I tried
echo
but it is not supported. Is there a guide to .xsf scripting?
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-10-2016 02:29 PM
Hi,
you can also send info to log, like: create log entry "Test string..."
--
Jarek
you can also send info to log, like: create log entry "Test string..."
--
Jarek
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-10-2016 01:10 PM
Credit goes to Drew C. Place these two lines at the end of your script
set var done "Done!"
show var done
X450G2-48p-G4.16 # load sc s.xsf
Done!
* X450G2-48p-G4.17 #
set var done "Done!"
show var done
X450G2-48p-G4.16 # load sc s.xsf
Done!
* X450G2-48p-G4.17 #
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-10-2016 01:10 PM
Thank you so much. That's exactly what I needed.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-10-2016 12:55 PM
easy python script. Just save it as a .py file and run it like you would a .xsf.
exsh.clicmd('show vlan', True)
exsh.clicmd('show port conf no', True)
exsh.clicmd('show vlan "Default"', True)
print ("Done!")
exsh.clicmd('show vlan', True)
exsh.clicmd('show port conf no', True)
exsh.clicmd('show vlan "Default"', True)
print ("Done!")
