-
Notifications
You must be signed in to change notification settings - Fork 4
01. About JSNAPy
You can use it to automate verifications on Junos devices (operational state verifications and configuration verifications).
This is the Python version of Junos SNapshot Administrator (JSNAP).
JSNAPy is supported in three modes:
- a command line tool
- a Python module
- An ansible module hosted on the Ansible Galaxy website (https://galaxy.ansible.com/Juniper/junos/)
Source code: https://github.com/Juniper/jsnapy
Documentation: https://github.com/Juniper/jsnapy/wiki
Samples: https://github.com/Juniper/jsnapy/tree/master/samples
Book: http://forums.juniper.net/t5/Day-One-Books/Day-One-Enabling-Automated-Network-Verifications-with-JSNAPy/ba-p/302104
JSNAPY Guide: https://www.juniper.net/techpubs/en_US/junos-snapshot1.0/information-products/pathway-pages/junos-snapshot-python.pdf
Other repositories to test JSNAPy: https://github.com/titom73/jsnapy-tester
Videos:
- JSNAPy Overview: https://www.youtube.com/watch?v=t7oGEbfdCt8
- JSNAPy Tutorial (Detailed): https://www.youtube.com/watch?v=it4HxJq0jR0
- Network Automation using Ansible & JSNAPy: https://www.youtube.com/watch?v=lv7lh3kwKns
- Others JSNAPy video: https://www.youtube.com/playlist?list=PLQ189o7cl3OwWSInb5hYsDfDPETrroAb2
Documentation: https://github.com/Juniper/jsnapy/wiki/1.-Installation
While installing Jsnapy, it creates Jsnapy folder at /etc and and /etc/logs.
You can refer to this link for the details.
ls /etc/jsnapy/ -l
/etc/jsnapy/jsnapy.cfg file contains default path for configuration files, snapshots and test files.
If required, overwrite the path in this file with your paths.
sublime-text /etc/jsnapy/jsnapy.cfg
/etc/jsnapy serves as the default lookup directory to search for configuration files when running various jsnapy commands.
User can chose different location by setting config_file_path in /etc/jsnapy/jsnapy.cfg
ls /etc/jsnapy/ -l
Test files should be located at /etc/jsnapy/testfiles.
User can chose different location by setting test_file_path in /etc/jsnapy/jsnapy.cfg
ls /etc/jsnapy/testfiles/ -l
/etc/jsnapy/snapshots directory contains all snapshots.
User can chose different location by setting snapshot_path in /etc/jsnapy/jsnapy.cfg
ls /etc/jsnapy/snapshots/ -l
The file /etc/jsnapy/logging.yml describes loggging settings.
The directory /var/log/jsnapy contains all log messages.
Read the documentation for the details
sublime-text /etc/jsnapy/logging.yml
ls /var/log/jsnapy/ -l
more /var/log/jsnapy/jsnapy.log