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

Modernize login #12

Open
wants to merge 7 commits into
base: devel
Choose a base branch
from
Open

Modernize login #12

wants to merge 7 commits into from

Conversation

q1x
Copy link
Collaborator

@q1x q1x commented Nov 28, 2024

What does this PR do?

This PR modernizes the login function to work with newer versions of Zabbix.

  • We now support API token authentication
  • Version 5.2 and above renamed user to username in the login method.

What issues does this PR fix or reference?

Fixes:

#1
#2

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.

q1x added 2 commits November 28, 2024 16:15
* Added support for login with username and password for Zabbix version 5.2 and above (username field changed in `user.login` method.

* Added support for token based auth
Updated docstring
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 62.62%. Comparing base (bc62200) to head (2eb7e14).

Files with missing lines Patch % Lines
src/saltext/zabbix/modules/zabbix.py 57.14% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel      #12      +/-   ##
==========================================
- Coverage   62.63%   62.62%   -0.02%     
==========================================
  Files          15       15              
  Lines        2703     2721      +18     
  Branches      390      394       +4     
==========================================
+ Hits         1693     1704      +11     
- Misses        892      898       +6     
- Partials      118      119       +1     
Flag Coverage Δ
Linux 62.62% <57.14%> (-0.02%) ⬇️
macOS 62.58% <57.14%> (-0.01%) ⬇️
project 43.58% <57.14%> (+0.17%) ⬆️
py310 62.58% <57.14%> (-0.01%) ⬇️
py39 62.62% <57.14%> (-0.02%) ⬇️
salt_3006_9 62.62% <57.14%> (-0.02%) ⬇️
salt_3007_1 62.58% <57.14%> (-0.01%) ⬇️
tests 98.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant