Skip to content

Set default transport and port settings for Napalm NXOS, if not set#61556

Merged
dmurphy18 merged 4 commits intosaltstack:masterfrom
dmurphy18:napalm_mod_https_bug59448
Feb 3, 2022
Merged

Set default transport and port settings for Napalm NXOS, if not set#61556
dmurphy18 merged 4 commits intosaltstack:masterfrom
dmurphy18:napalm_mod_https_bug59448

Conversation

@dmurphy18
Copy link
Contributor

What does this PR do?

Sets the default transport and port values for Napalm NXOS if they are not set. Napalm itself does this, but Salt is not recognizing these defaults values correctly and setting None, without an appropriate default value.

What issues does this PR fix or reference?

Fixes: #59448

Previous Behavior

Would cause a traceback when attempting to use the url 'None://a.b.c.d' rather than 'https' or 'http'.

New Behavior

Correctly now sets a default transport of 'https' and appropriate port 443.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@dmurphy18 dmurphy18 requested a review from a team as a code owner February 1, 2022 00:05
@dmurphy18 dmurphy18 requested review from krionbsd and removed request for a team February 1, 2022 00:05
@dmurphy18 dmurphy18 force-pushed the napalm_mod_https_bug59448 branch from 65a3aa0 to ea476cb Compare February 1, 2022 00:07
@dmurphy18
Copy link
Contributor Author

re-run all

@dmurphy18 dmurphy18 force-pushed the napalm_mod_https_bug59448 branch from f6c6ba5 to 90a85f6 Compare February 1, 2022 15:52
@dmurphy18
Copy link
Contributor Author

dmurphy18 commented Feb 1, 2022

The GitHub Actions Doc bot needs to be adjusted, since needs to allow for 'Usage example' present to stop the 'CLI Example' from generating an email.

Both have warning stating 'This function is not suitable for CLI usage' in the doc string, which is what the bot is complaining about

Bot is correct see #61566 for tech debt here

@dmurphy18
Copy link
Contributor Author

re-run freebsd

@dmurphy18
Copy link
Contributor Author

re-run centos-8

@dmurphy18
Copy link
Contributor Author

re-run centos

@dmurphy18
Copy link
Contributor Author

re-run centosstream-8

@dmurphy18
Copy link
Contributor Author

re-run all

@dmurphy18
Copy link
Contributor Author

re-run freebsd

garethgreenaway
garethgreenaway previously approved these changes Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

Hi! I'm your friendly PR bot!

You might be wondering what I'm doing commenting here on your PR.

Yes, as a matter of fact, I am...

I'm just here to help us improve the documentation. I can't respond to
questions or anything, but what I can do, I do well!

Okay... so what do you do?

I detect modules that are missing docstrings or "CLI Example" on existing docstrings!
When I was created we had a lot of these. The documentation for these
modules need some love and attention to make Salt better for our users.

So what does that have to do with my PR?

I noticed that in this PR there are some files changed that have some of these
issues. So I'm leaving this comment to let you know your options.

Okay, what are they?

Well, my favorite, is that since you were making changes here I'm hoping that
you would be the most familiar with this module and be able to add some other
examples or fix any of the reported issues.

If I can, then what?

Well, you can either add them to this PR or add them to another PR. Either way is fine!

Well... what if I can't, or don't want to?

That's also fine! We appreciate all contributions to the Salt Project. If you
can't add those other examples, either because you're too busy, or unfamiliar,
or you just aren't interested, we still appreciate the contributions that
you've made already.

Whatever approach you decide to take, just drop a comment here letting us know!

Detected Issues (click me)
Check Known Missing Docstrings...........................................Failed
- hook id: invoke
- duration: 1.57s
- exit code: 1

The function 'netmiko_conn' on 'salt/modules/napalm_mod.py' does not have a 'CLI Example:' in it's docstring
The function 'pyeapi_conn' on 'salt/modules/napalm_mod.py' does not have a 'CLI Example:' in it's docstring
Found 2 errors


Thanks again!

@dmurphy18 dmurphy18 merged commit 2d29d45 into saltstack:master Feb 3, 2022
@dmurphy18 dmurphy18 deleted the napalm_mod_https_bug59448 branch June 15, 2023 17:14
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.

[BUG] napalm_mod.py does not set a default transport method for NXOS. It should be https.

2 participants