{"action":"created","comment":{"url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/comments/45520509","id":45520509,"diff_hunk":"@@ -14,64 +14,42 @@ agentaddress <%= @agentaddress.join(',') %>\n \n # ------------------------------------------------------------------------------\n # Traditional Access Control\n-<% if @ro_community and (@ro_community.size > 0) -%>\n-<% if (@ro_network.is_a?(Array)) and (@ro_network.count > 0) -%>\n-<% @ro_network.each do |ro_net| -%>\n-rocommunity <%= @ro_community %> <%= ro_net %>\n-<% end -%>\n-<% else -%>\n-rocommunity <%= @ro_community %> <%= @ro_network %>\n-<% end -%>\n-<% end -%>\n-<% if @ro_community6 and (@ro_community6.size > 0) -%>\n-<% if (@ro_network6.is_a?(Array)) and (@ro_network6.count > 0) -%>\n-<% @ro_network6.each do |ro_net6| -%>\n-rocommunity6 <%= @ro_community6 %> <%= ro_net6 %>\n-<% end -%>\n-<% else -%>\n-rocommunity6 <%= @ro_community6 %> <%= @ro_network6 %>\n-<% end -%>\n-<% end -%>\n-<% if @rw_community and (@rw_community.size > 0) -%>\n-<% if (@rw_network.is_a?(Array)) and (@rw_network.count > 0) -%>\n-<% @rw_network.each do |rw_net| -%>\n-rwcommunity <%= @rw_community %> <%= rw_net %>\n-<% end -%>\n-<% else -%>\n-rwcommunity <%= @rw_community %> <%= @rw_network %>\n-<% end -%>\n-<% end -%>\n-<% if @rw_community6 and (@rw_community6.size > 0) -%>\n-<% if (@rw_network6.is_a?(Array)) and (@rw_network6.count > 0) -%>\n-<% @rw_network6.each do |rw_net6| -%>\n-rwcommunity6 <%= @rw_community6 %> <%= rw_net6 %>\n-<% end -%>\n-<% else -%>\n-rwcommunity6 <%= @rw_community6 %> <%= @rw_network6 %>\n-<% end -%>\n-<% end -%>\n+<%- [*@ro_community].compact.each do |c| -%>\n+  <%- [*@ro_network].compact.each do |n| -%>\n+rocommunity <%= c %> <%= n %>\n+  <%- end -%>\n+<%- end -%>\n+<%- [*@ro_community6].compact.each do |c| -%>\n+  <%- [*@ro_network6].compact.each do |n| -%>\n+rocommunity6 <%= c %> <%= n %>\n+  <%- end -%>\n+<%- end -%>\n+<%- [*@rw_community].compact.each do |c| -%>\n+  <%- [*@rw_network].compact.each do |n| -%>\n+rwcommunity <%= c %> <%= n %>\n+  <%- end -%>\n+<%- end -%>\n+<%- [*@rw_community6].compact.each do |c| -%>\n+  <%- [*@rw_network6].compact.each do |n| -%>\n+rocommunity6 <%= c %> <%= n %>\n+  <%- end -%>\n+<%- end -%>\n \n # ------------------------------------------------------------------------------\n # VACM Configuration\n #       sec.name       source        community\n-<% if @com2sec.any? -%>","path":"templates/snmpd.conf.erb","position":64,"original_position":64,"commit_id":"be5e6180f6abf5df02eec22efe9de15482e4a7ea","original_commit_id":"be5e6180f6abf5df02eec22efe9de15482e4a7ea","user":{"login":"jrwesolo","id":344114,"avatar_url":"https://avatars.githubusercontent.com/u/344114?v=3","gravatar_id":"","url":"https://api.github.com/users/jrwesolo","html_url":"https://github.com/jrwesolo","followers_url":"https://api.github.com/users/jrwesolo/followers","following_url":"https://api.github.com/users/jrwesolo/following{/other_user}","gists_url":"https://api.github.com/users/jrwesolo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwesolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwesolo/subscriptions","organizations_url":"https://api.github.com/users/jrwesolo/orgs","repos_url":"https://api.github.com/users/jrwesolo/repos","events_url":"https://api.github.com/users/jrwesolo/events{/privacy}","received_events_url":"https://api.github.com/users/jrwesolo/received_events","type":"User","site_admin":false},"body":"No longer needed since we validate that `com2sec` is an array in `init.rb`.","created_at":"2015-11-20T21:26:34Z","updated_at":"2015-11-20T21:26:34Z","html_url":"https://github.com/razorsedge/puppet-snmp/pull/61#discussion_r45520509","pull_request_url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/comments/45520509"},"html":{"href":"https://github.com/razorsedge/puppet-snmp/pull/61#discussion_r45520509"},"pull_request":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61","id":51410298,"html_url":"https://github.com/razorsedge/puppet-snmp/pull/61","diff_url":"https://github.com/razorsedge/puppet-snmp/pull/61.diff","patch_url":"https://github.com/razorsedge/puppet-snmp/pull/61.patch","issue_url":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/61","number":61,"state":"open","locked":false,"title":"Conglomerate of PRs with tests","user":{"login":"jrwesolo","id":344114,"avatar_url":"https://avatars.githubusercontent.com/u/344114?v=3","gravatar_id":"","url":"https://api.github.com/users/jrwesolo","html_url":"https://github.com/jrwesolo","followers_url":"https://api.github.com/users/jrwesolo/followers","following_url":"https://api.github.com/users/jrwesolo/following{/other_user}","gists_url":"https://api.github.com/users/jrwesolo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwesolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwesolo/subscriptions","organizations_url":"https://api.github.com/users/jrwesolo/orgs","repos_url":"https://api.github.com/users/jrwesolo/repos","events_url":"https://api.github.com/users/jrwesolo/events{/privacy}","received_events_url":"https://api.github.com/users/jrwesolo/received_events","type":"User","site_admin":false},"body":"I was looking at this module and saw a few open pull requests that seem to have been abandoned by their submitters. I went ahead and implemented some of the changes, complete with tests, for the following PRs: #29, #43, #49.\r\n\r\n**Highlights**\r\n* Simplify the snmpd.conf template with some ruby magic\r\n* Allow the community and network variables to be strings or arrays\r\n* Change default groups to be empty, prevent DDoS\r\n* Allow `service_config_perms` to be a class parameter\r\n* Validate additional arrays in `init` class\r\n* Add test coverage for new code as well as some old code","created_at":"2015-11-20T21:25:54Z","updated_at":"2015-11-20T21:26:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bceaf3f6e977e09198bfa6ad56907b87f62be3eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61/commits","review_comments_url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61/comments","review_comment_url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/61/comments","statuses_url":"https://api.github.com/repos/razorsedge/puppet-snmp/statuses/be5e6180f6abf5df02eec22efe9de15482e4a7ea","head":{"label":"jrwesolo:pr-conglomerate-fix","ref":"pr-conglomerate-fix","sha":"be5e6180f6abf5df02eec22efe9de15482e4a7ea","user":{"login":"jrwesolo","id":344114,"avatar_url":"https://avatars.githubusercontent.com/u/344114?v=3","gravatar_id":"","url":"https://api.github.com/users/jrwesolo","html_url":"https://github.com/jrwesolo","followers_url":"https://api.github.com/users/jrwesolo/followers","following_url":"https://api.github.com/users/jrwesolo/following{/other_user}","gists_url":"https://api.github.com/users/jrwesolo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwesolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwesolo/subscriptions","organizations_url":"https://api.github.com/users/jrwesolo/orgs","repos_url":"https://api.github.com/users/jrwesolo/repos","events_url":"https://api.github.com/users/jrwesolo/events{/privacy}","received_events_url":"https://api.github.com/users/jrwesolo/received_events","type":"User","site_admin":false},"repo":{"id":46581689,"name":"puppet-snmp","full_name":"jrwesolo/puppet-snmp","owner":{"login":"jrwesolo","id":344114,"avatar_url":"https://avatars.githubusercontent.com/u/344114?v=3","gravatar_id":"","url":"https://api.github.com/users/jrwesolo","html_url":"https://github.com/jrwesolo","followers_url":"https://api.github.com/users/jrwesolo/followers","following_url":"https://api.github.com/users/jrwesolo/following{/other_user}","gists_url":"https://api.github.com/users/jrwesolo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwesolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwesolo/subscriptions","organizations_url":"https://api.github.com/users/jrwesolo/orgs","repos_url":"https://api.github.com/users/jrwesolo/repos","events_url":"https://api.github.com/users/jrwesolo/events{/privacy}","received_events_url":"https://api.github.com/users/jrwesolo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrwesolo/puppet-snmp","description":"Puppet module to manage Net-SNMP.","fork":true,"url":"https://api.github.com/repos/jrwesolo/puppet-snmp","forks_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/forks","keys_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/teams","hooks_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/hooks","issue_events_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/issues/events{/number}","events_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/events","assignees_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/assignees{/user}","branches_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/branches{/branch}","tags_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/tags","blobs_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/statuses/{sha}","languages_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/languages","stargazers_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/stargazers","contributors_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/contributors","subscribers_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/subscribers","subscription_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/subscription","commits_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/contents/{+path}","compare_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/merges","archive_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/downloads","issues_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/issues{/number}","pulls_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/pulls{/number}","milestones_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/milestones{/number}","notifications_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/labels{/name}","releases_url":"https://api.github.com/repos/jrwesolo/puppet-snmp/releases{/id}","created_at":"2015-11-20T19:16:33Z","updated_at":"2015-11-20T19:16:34Z","pushed_at":"2015-11-20T21:18:50Z","git_url":"git://github.com/jrwesolo/puppet-snmp.git","ssh_url":"git@github.com:jrwesolo/puppet-snmp.git","clone_url":"https://github.com/jrwesolo/puppet-snmp.git","svn_url":"https://github.com/jrwesolo/puppet-snmp","homepage":"http://forge.puppetlabs.com/razorsedge/snmp","size":227,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"razorsedge:master","ref":"master","sha":"42b4334410d979d6b42de491c4c627202e8902b6","user":{"login":"razorsedge","id":788498,"avatar_url":"https://avatars.githubusercontent.com/u/788498?v=3","gravatar_id":"","url":"https://api.github.com/users/razorsedge","html_url":"https://github.com/razorsedge","followers_url":"https://api.github.com/users/razorsedge/followers","following_url":"https://api.github.com/users/razorsedge/following{/other_user}","gists_url":"https://api.github.com/users/razorsedge/gists{/gist_id}","starred_url":"https://api.github.com/users/razorsedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razorsedge/subscriptions","organizations_url":"https://api.github.com/users/razorsedge/orgs","repos_url":"https://api.github.com/users/razorsedge/repos","events_url":"https://api.github.com/users/razorsedge/events{/privacy}","received_events_url":"https://api.github.com/users/razorsedge/received_events","type":"User","site_admin":false},"repo":{"id":3691169,"name":"puppet-snmp","full_name":"razorsedge/puppet-snmp","owner":{"login":"razorsedge","id":788498,"avatar_url":"https://avatars.githubusercontent.com/u/788498?v=3","gravatar_id":"","url":"https://api.github.com/users/razorsedge","html_url":"https://github.com/razorsedge","followers_url":"https://api.github.com/users/razorsedge/followers","following_url":"https://api.github.com/users/razorsedge/following{/other_user}","gists_url":"https://api.github.com/users/razorsedge/gists{/gist_id}","starred_url":"https://api.github.com/users/razorsedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razorsedge/subscriptions","organizations_url":"https://api.github.com/users/razorsedge/orgs","repos_url":"https://api.github.com/users/razorsedge/repos","events_url":"https://api.github.com/users/razorsedge/events{/privacy}","received_events_url":"https://api.github.com/users/razorsedge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/razorsedge/puppet-snmp","description":"Puppet module to manage Net-SNMP.","fork":false,"url":"https://api.github.com/repos/razorsedge/puppet-snmp","forks_url":"https://api.github.com/repos/razorsedge/puppet-snmp/forks","keys_url":"https://api.github.com/repos/razorsedge/puppet-snmp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/razorsedge/puppet-snmp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/razorsedge/puppet-snmp/teams","hooks_url":"https://api.github.com/repos/razorsedge/puppet-snmp/hooks","issue_events_url":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/events{/number}","events_url":"https://api.github.com/repos/razorsedge/puppet-snmp/events","assignees_url":"https://api.github.com/repos/razorsedge/puppet-snmp/assignees{/user}","branches_url":"https://api.github.com/repos/razorsedge/puppet-snmp/branches{/branch}","tags_url":"https://api.github.com/repos/razorsedge/puppet-snmp/tags","blobs_url":"https://api.github.com/repos/razorsedge/puppet-snmp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/razorsedge/puppet-snmp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/razorsedge/puppet-snmp/git/refs{/sha}","trees_url":"https://api.github.com/repos/razorsedge/puppet-snmp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/razorsedge/puppet-snmp/statuses/{sha}","languages_url":"https://api.github.com/repos/razorsedge/puppet-snmp/languages","stargazers_url":"https://api.github.com/repos/razorsedge/puppet-snmp/stargazers","contributors_url":"https://api.github.com/repos/razorsedge/puppet-snmp/contributors","subscribers_url":"https://api.github.com/repos/razorsedge/puppet-snmp/subscribers","subscription_url":"https://api.github.com/repos/razorsedge/puppet-snmp/subscription","commits_url":"https://api.github.com/repos/razorsedge/puppet-snmp/commits{/sha}","git_commits_url":"https://api.github.com/repos/razorsedge/puppet-snmp/git/commits{/sha}","comments_url":"https://api.github.com/repos/razorsedge/puppet-snmp/comments{/number}","issue_comment_url":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/comments{/number}","contents_url":"https://api.github.com/repos/razorsedge/puppet-snmp/contents/{+path}","compare_url":"https://api.github.com/repos/razorsedge/puppet-snmp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/razorsedge/puppet-snmp/merges","archive_url":"https://api.github.com/repos/razorsedge/puppet-snmp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/razorsedge/puppet-snmp/downloads","issues_url":"https://api.github.com/repos/razorsedge/puppet-snmp/issues{/number}","pulls_url":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls{/number}","milestones_url":"https://api.github.com/repos/razorsedge/puppet-snmp/milestones{/number}","notifications_url":"https://api.github.com/repos/razorsedge/puppet-snmp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/razorsedge/puppet-snmp/labels{/name}","releases_url":"https://api.github.com/repos/razorsedge/puppet-snmp/releases{/id}","created_at":"2012-03-12T01:39:28Z","updated_at":"2015-11-12T07:48:46Z","pushed_at":"2015-11-20T21:25:55Z","git_url":"git://github.com/razorsedge/puppet-snmp.git","ssh_url":"git@github.com:razorsedge/puppet-snmp.git","clone_url":"https://github.com/razorsedge/puppet-snmp.git","svn_url":"https://github.com/razorsedge/puppet-snmp","homepage":"http://forge.puppetlabs.com/razorsedge/snmp","size":745,"stargazers_count":17,"watchers_count":17,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":13,"forks":65,"open_issues":13,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61"},"html":{"href":"https://github.com/razorsedge/puppet-snmp/pull/61"},"issue":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/61"},"comments":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/razorsedge/puppet-snmp/statuses/be5e6180f6abf5df02eec22efe9de15482e4a7ea"}}}}