Jsnapy

Latest version: v1.3.7

Safety actively analyzes 630450 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 4

0.1.5beta

Feature Enhancement:

1] Functionality to pass id as a list.
Now IDs can be passed both as string or list.
For Example

yaml
One way:

test_command_bgp_neighbor:
- command: show bgp neighbor
- iterate:
xpath: bgp-peer
id: [ ./peer-address, ./peer-as ]
........

Second way:
test_command_bgp_neighbor:
- command: show bgp neighbor
- iterate:
xpath: bgp-peer
id: ./peer-address, ./peer-as
.....


2] Modified test cases to compare attribute values.
Can compare attributes via:

yaml
check_int_ext:
- command: show interfaces extensive
- iterate:
xpath: //interface-information/physical-interface[normalize-space(admin-status)="up" and logical-interface/address-family/address-family-name and interface-flapped[seconds]]
tests:
- is-gt: interface-flapped/seconds, 600
info: Interfaces {{post['name']}} with family defined is UP for more than 10 min
err: Interface {{post['name']}} is Up since XX seconds


3] Less verbose CLI output.
Modified info and debug level messages in case of test pass and fail.
4] Changes for module feature.
5] JSNAPy can also take test file from present working directory.


Now user can give test files by:
1. giving complete path
2. it is present in current working directory
3. it looks in default directory mentioned in jsnapy.cfg (/etc/jsnapy/testfiles)


6] More verbose error message.
Now error message is also printing xpath and id details when no node is found.

Bug Fixes:
1. Modified messages in case of id miss match
2. resolving space issue in info and err messages
3. resolving issue in printing err/info messages (hyphen was getting converted into underscore)
4. If arguments are not given properly, then it should print help message

0.1.4beta

Feature Enhancement:

1) Added support for configuration command by using display xml
For example:


check_certificate:
- command: show configuration security certificates | display xml
- iterate:
xpath: //configuration/security/certificates
tests:
- is-equal: local/name, mycert
info: "Name matches .. PASS...NAME - <{{pre['local/name']}}>"
err: "Name Not matching.. FAIL...NAME - <{{pre['local/name']}}>"


2) Added jsnap2py tool to convert JSNAP-slax conf files into yaml files that can be directly consumed by JSNAPy.
3) Added wiki page containing documentation about JSNAPy.
4) Modified sample examples.

Bug Fixes

1) Fix bug in no-diff and delta test operator, in case when no of post nodes are greater than no of pre nodes.
2) Added color to error and exception messages.
3) Modified no_diff, not_less, not_more and delta for id miss match error.

0.1.3beta

Feature Enhancements
1. RPC error and warning will be stored in snapshots (and database also)
2. Renamed devices to device in main yaml config file


example:
hosts:
- devices: 10.209.16.204
username : abc
passwd: pqr
tests:
- test_exists.yml

can be written as:
hosts:
- device: 10.209.16.204
username : abc
passwd: pqr
tests:
- test_exists.yml

3. Updated README.md file

Bug Fixes
1. Fixed bug in not-exists test operator

0.1.2beta

Feature Enhancement:


1. If password is not given and ssh is also not configured then it will prompt for password.
2. renaming args to kwargs in rpc in yaml testfiles.
3. Modified —diff command, if complete path of snapfile is given then no need to give config file.


Bug Fixes:


1. Modified snapfile names, all special characters are now replaced with underscore
For example:
1. for command show interface terse ge-0/0/0
name is: router_pre_show_interfaces_terse_ge_0_0_0.xml
2. for command show interface terse lo*
name is: router_post_show_interfaces_terse_lo_.xml
2. not-exists operator was not displaying error messages given in testcase, in case of test failure.
3. Disable logs coming from other imported modules.

0.1.1beta

Filter xml issue fixed

0.1beta

Page 4 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.