-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port included in filename during snapcheck, but not during snap #374
Comments
The workaround was to remove the port configuration from the config file, but I believe you should not be constructing the filenames differently in snap or snapcheck |
Hi @dangerChef
Thanks |
I have provided the pass log in the above comment, closing this issue.. Thanks |
When running jsnapy as a module, if a port is specified in the configuration but the pre-connected device object is passed to SnapAdmin(), the snapshot filename from the snap action does not contain the port number but snapcheck does expect the port number to be in the filename.
Tests Included: test_route_summary
*************************RPC is get-route-summary-information*************************
ERROR, Snapshot file /tmp/snapshots/192.168.0.1_22_pre_get_route_summary_information.xml is not present in given path !!
Setup
Jsnapy is being run as a module from within a pyez script and connecting to a specific port (ie: port 22) - the device object connection is already established before passing the device object to SnapAdmin() - the jsnapy config file references port 22
Steps to Reproduce Issue
First, the config file needs to contain the port number:
Second, jsnapy must be running as a module in a pyez script:
Third, you must connect to the device outside of jsnapy and pass the device object to SnapAdmin():
Then you do the snapcheck in a similar manner (connect prior and pass the object)
js.snap(config_data, "post", dev)
Then do the comparison:
chk = js.check(config_data, "pre", "post")
Versions Report
[aelliott]$ jsnapy --version
JSNAPy version: 1.3.2
[aelliott]$ python3 -V
Python 3.6.8
The text was updated successfully, but these errors were encountered: