-
Notifications
You must be signed in to change notification settings - Fork 30
Add support for http and socket transports #65
Add support for http and socket transports #65
Conversation
b058923
to
db0b504
Compare
|
||
if self.transport == 'https': | ||
self.port = optional_args.get('port', 443) | ||
elif self.transrpot == 'http': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: self.transport
instead of self.transrpot
self.port = optional_args.get('port', 443) | ||
elif self.transrpot == 'http': | ||
self.port = optional_args.get('port', 80) | ||
|
||
self.enablepwd = optional_args.get('enable_password', '') | ||
|
||
def open(self): | ||
"""Implemantation of NAPALM method open.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed this one Implemantation
:)
Also, the |
Can you send your script and any relevant configuration? I just want to make sure I test your same exact conditions. |
@dbarrosop No relevant conditions as such. But my recollection of using pyeapi with unix sockets was as mentioned above. The script is nothing major, basically opening a connection to the box using the unix socket and calling one of napalm's methods, something like a |
@narJH27 I don't really understand what you are asking for with this:
Unix sockets are local by nature, you can't connect from the outside unless they are exposed via a TCP port, which is what the http and https transports are for. |
@dbarrosop Apologies for using the phrase |
So this is done then. Merging. |
Fixes #64
@narJH27 would you mind testing this branch?
If it works I will document the optional arg in the official documentation.