-
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
Code changes for #349 and #350. #352
Open
rahkumar651991
wants to merge
14
commits into
Juniper:master
Choose a base branch
from
rahkumar651991:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Fixes for issues Juniper#345, Juniper#324, Juniper#325 * Fixed conditions for UT. * Condition fixed for UT * Fixes for issues Juniper#345, Juniper#324, Juniper#325 Juniper#347 * Fixes for issues Juniper#345, Juniper#324, Juniper#325 * Fixes for issues Juniper#345, Juniper#324, Juniper#325
Updating dev version
This reverts commit 44d3538.
Pull Request Test Coverage Report for Build 286
💛 - Coveralls |
Pull Request Test Coverage Report for Build 305
💛 - Coveralls |
* Update setup.py I've noticed that this setup.py does not work when trying to execute "pip install jsnapy" from a Python 3.X Virtual environment. It appears that Python 3.X does not use the sys.real_prefix attribute any more. I found some documentation here https://stackoverflow.com/questions/1871549/determine-if-python-is-running-inside-virtualenv showing that it is moved to base_prefix. What i've added will check sys.base_prefix and compare it to sys.prefix, if it doesn't match, than you're in a virtual environment. Outside of VirtualEnv; Gian-Lucas-MacBook-Pro:~ gianluca.casella$ python3.8 Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.base_prefix '/Library/Frameworks/Python.framework/Versions/3.8' >>> sys.prefix '/Library/Frameworks/Python.framework/Versions/3.8' >>> quit() Inside VirtualEnv: Gian-Lucas-MacBook-Pro:~ gianluca.casella$ source venv/bin/activate (venv) Gian-Lucas-MacBook-Pro:~ gianluca.casella$ python Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.base_prefix '/Library/Frameworks/Python.framework/Versions/3.8' >>> sys.prefix '/Users/gianluca.casella/venv' * Update setup.py Updated typo on hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix)) * Update setup.py Added line 75 * Update __init__.py Modified line 29 to enable Python 3.X Support in Virtual Environments * Update test_init.py Modified line 39 to add Python 3.X Support for Virtual Environments * Added the venv_check() function to the setup.py and lib/jnpr/jsnapy/__init__.py
* port support added for same Ip-address. Juniper#322 * port support added for same Ip-address. Juniper#322
vnitinv
approved these changes
Feb 3, 2020
@rahkumar651991 can you please resolve conflicts? |
…Juniper as well as Day-One Book about hardening Junos (Juniper#344)
rahkumar651991
force-pushed
the
master
branch
from
February 19, 2020 08:11
032509e
to
9c97976
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The PR enhances the performances to parse testcase before hostname than doing individually for all devices. It doesn't change the functionality just optimises it.
It also gives the developer an option to enhance logging which will be helpful in debugging process.
What issues does this PR fix or reference?
#349 and #350
Previous Behavior
Testcases were parsed everytime for multiple devices configured.
New Behavior
Testcases will be parsed once and then passed as an argument to all the devices to be connected.
Tests written?
Previous testcases were modified for new api.