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

hetzner cloud show_instance function should be an action #61394

Merged

Conversation

fkantelberg
Copy link
Contributor

What does this PR do?

This PR should change the show_instance function of the hetzner cloud provider to ensure the call as an action like the other cloud providers do.

What issues does this PR fix or reference?

Fixes: #61392

Previous Behavior

The function raised an error when called as action with an error message that it had to be called as function

New Behavior

The function can only be called as an action

Merge requirements satisfied?

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

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

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

@fkantelberg fkantelberg requested a review from a team as a code owner December 24, 2021 07:38
@fkantelberg fkantelberg requested review from MKLeb and removed request for a team December 24, 2021 07:38
HerHde
HerHde previously approved these changes Dec 24, 2021
Copy link
Contributor

@HerHde HerHde left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot!

@MKLeb
Copy link
Contributor

MKLeb commented Jan 3, 2022

Hey @fkantelberg, would you mind adding a changelog to this? Then I think it looks good to me

@fkantelberg
Copy link
Contributor Author

Hello @MKLeb
Is there something wrong with the file changelog/61392.fixed?

@MKLeb
Copy link
Contributor

MKLeb commented Jan 4, 2022

@fkantelberg Oop, didn't see that one there. Sorry!

salt/cloud/clouds/hetzner.py Outdated Show resolved Hide resolved
Co-authored-by: Caleb Beard <53276404+MKLeb@users.noreply.github.com>
@fkantelberg
Copy link
Contributor Author

No worries. Thank you for the review.

@github-actions
Copy link

github-actions bot commented Jan 5, 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.08s
- exit code: 1

The function 'avail_locations' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'avail_images' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'avail_sizes' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_ssh_keys' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_nodes_full' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_nodes' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'show_instance' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
Found 7 errors


Thanks again!

@fkantelberg fkantelberg requested a review from MKLeb January 7, 2022 06:59
@waynew
Copy link
Contributor

waynew commented Jan 10, 2022

Aside from an integration test that actually runs against a real hetzner cloud, there's not really any meaningful test that we could write here. Given the confirmation in the linked issue, I think it makes sense to go ahead and merge this without requiring tests.

@garethgreenaway garethgreenaway merged commit 43e6a02 into saltstack:master Jan 10, 2022
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] Salt-Cloud Hetzner fails on cloud.present
5 participants