Skip to content
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 support added for same Ip-address. #355

Merged
merged 2 commits into from
Feb 3, 2020

Conversation

rahkumar651991
Copy link
Contributor

What does this PR do?

This supports connecting to same IP-address with different port number.

What issues does this PR fix or reference?

Fix for #322

Previous Behavior

Earlier the devices used to be stored with key value as the hostname. So multiple entries of same hostname but different ip-address were not supported.

New Behavior

The code is modified to store all the devices. Then one by one it tries to connects based on the hostname and other arguments provided.

lib/jnpr/jsnapy/jsnapy.py Outdated Show resolved Hide resolved
@@ -89,6 +95,8 @@ def generate_snap_file(self, output_file, hostname, name, cmd_format):
:param cmd_format: xml/text
:return: return output file
"""
if self.port is not None:
hostname = hostname + "_" + str(self.port)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format.
hostname = "{}_{}".format(hostname, self.port)

Copy link
Contributor

@vnitinv vnitinv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check my comments

@vnitinv vnitinv merged commit 989dfea into Juniper:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants