Open
Conversation
simingy
reviewed
Oct 24, 2018
| import unicon | ||
|
|
||
| from genie.conf import Genie | ||
| from ats.topology import loader |
Contributor
There was a problem hiding this comment.
if this is intended for pyats v5.0+ -> all the imports should reflect
from pyats.topology instead... but this is a minor comment
| genie_testbed = Genie.init(args.testbed) | ||
|
|
||
| # this gives us device_name as Device Object e.g dist1 | ||
| vars()[device_name] = genie_testbed.devices[device_name] |
Contributor
There was a problem hiding this comment.
the more appropriate way would be to do locals()
but then again - device_name could have a dash, then it's an inappropriate variable name.
i would suggest to not show this part. it will definitely confuse novice users
| # unicon.logs.remove_stream_handler(logging) | ||
|
|
||
| # connect to the device (quietly) | ||
| import time |
Contributor
There was a problem hiding this comment.
imports on top or on top of if name == 'main' is good practise imo
Contributor
Author
|
Thanks for the feedback @siming85 I actually believe that I'm going to remove pyats-intro from this repo all together, and find a home for it on it's own. |
Contributor
|
close the PR? |
Contributor
Author
|
No, still need the doc updates and fixes for the ios-samples, I’ll tack on another commit
…Sent from my iPhone
On Oct 24, 2018, at 4:37 PM, Siming Yuan <notifications@github.com<mailto:notifications@github.com>> wrote:
close the PR?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGbVSiq1xqVPxM4ex5TRaC3PJtXNy-3Vks5uoN2pgaJpZM4X2qmz>.
|
This file contains hidden or 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
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.
Addresses https://github.com/CiscoDevNet/pyats-labs/issues/14
As well as some other general improvement to docs/usability