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

Remove nulls to prevent Zabbix API errors #51915

Merged
merged 2 commits into from
Mar 1, 2019
Merged

Remove nulls to prevent Zabbix API errors #51915

merged 2 commits into from
Mar 1, 2019

Conversation

timdufrane
Copy link

If IP or DNS are null, Zabbix API returns an error. Prefer empty string over null.

What does this PR do?

Replaces nulls with empty strings in "ip" and "dns" params

What issues does this PR fix or reference?

N/A

Previous Behavior

Null ip or dns params if empty

New Behavior

Empty string ip or dns params if empty

Tests written?

No

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.

If IP or DNS are null, Zabbix API returns an error. Prefer empty string over null.
salt/states/zabbix_host.py Outdated Show resolved Hide resolved
salt/states/zabbix_host.py Outdated Show resolved Hide resolved
Change to use default value in case of null, as per request
@dwoz dwoz merged commit 75d2c0c into saltstack:develop Mar 1, 2019
@timdufrane timdufrane deleted the patch-1 branch March 1, 2019 16:37
garethgreenaway added a commit to garethgreenaway/salt that referenced this pull request Sep 19, 2019
dwoz added a commit that referenced this pull request Dec 14, 2019
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