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

Implement self.prefetch for zabbix_hostgroup #593

Conversation

baurmatt
Copy link
Contributor

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

This is another change for #570.

Copy link
Member

@alexjfisher alexjfisher left a comment

Choose a reason for hiding this comment

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

LGTM (and we have acceptance tests for this type, and they all still pass.)

end
end
end

def create
# Connect to zabbix api
hgid = zbx.hostgroups.create(name: @resource[:name])
hgid
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason for assigning to hgid here? create doesn’t actually need to return anything, does it?

api_hostgroups.map do |group_name, _id|
new(
ensure: :present,
name: group_name
Copy link
Member

Choose a reason for hiding this comment

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

Is provider: :ruby needed here?
Or is that just what I’ve done in the past by blindly following what I read somewhere once?! (Probably http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/)

@alexjfisher alexjfisher merged commit 1772fdd into voxpupuli:master Mar 1, 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