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