juno-snap

junosnap

Juno-Snapy: Junos Device Snapshot Manager

Overview: Juno-Snap is a snapshot utility designed specifically for managing Junos devices. Built on top of the Junos JSNAPy framework, it provides an efficient way to capture and compare device states during network maintenance windows. This utility automates the process of taking pre- and post-maintenance snapshots, ensuring a smooth and reliable way to analyze changes in network device configurations.

Inspired by: https://github.com/Juniper/junos-snapshot-administrator

Key Features:

  1. IP Validation: Ensures that the provided IP addresses are valid and reachable before proceeding with any operations.
  2. SSH Connection Validation: Verifies the SSH connection to the network device, ensuring secure and successful communication.
  3. Dynamic Configuration: Automatically generates a config.yaml file tailored to the specific network device, streamlining the setup process.
  4. Snapshot Management: Takes pre- and post-maintenance snapshots based on the commands specified in the command.yaml file, allowing for easy comparison.
  5. Automated Comparison: Compares the pre and post-snapshots and provides an overview of the changes, helping identify any issues or deviations during the maintenance window. [uses jsnapy snap-snap-diff approach ]

Use Case: Juno-Snapy is especially useful during network maintenance. By automating the snapshot process, it provides network engineers with a reliable tool to track and validate changes, ensuring the network’s integrity before and after maintenance activities.

prequisites

Juno-snap utility installation

How to run

Some important files to be used by utility

1. config.ini This file will store configurations, including credentials and paths required for the utility to function. Below is a sample structure for config.ini:

2. snap_config.yaml This YAML file will be automatically created in the current directory. It will typically include configuration details that the utility uses during its execution, such as device-specific settings

3. command_config.yaml This file specifies the commands to run on the network device, which are used for taking pre- and post-maintenance snapshots. Refer to the jsnapy documentation for how to write additional test cases.

4. snapshot_status.db This is a database file that tracks the state of snapshots:

This file is automatically updated by the utility when snapshots are taken.

Workflow:

  1. Configuration: Set up config.ini with the necessary paths and credentials along with update commands in command_config.yaml
  2. Initial Setup: Run the utility,enter device IP address , upon successful ip validation,device connectivity with given credentials checked then it will create snap_config.yaml and executes commands / testcases mentioned in command_config.yaml.
  3. Snapshot Status Tracking: The utility checks snapshot_status.db to determine the current state of snapshots and updates it as snapshots are taken.

Summary:

Pre-snapshot

Screenshot-pre-snap

Post-snapshot and diff

Screenshot-post-snap-diff