Skip to content
This repository was archived by the owner on Oct 11, 2020. It is now read-only.

01. About JSNAPy

Khelil Sator edited this page Jun 3, 2017 · 1 revision

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:

Documentation:

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:

Installation:

Documentation: https://github.com/Juniper/jsnapy/wiki/1.-Installation

Default structure:

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

jsnapy.cfg file:

/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 

Configuration files:

/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

testfiles directory:

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

snapshots directory:

/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

logging.yml file:

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 

Clone this wiki locally