sensu / sensu-chef

Sensu Chef cookbook.
https://supermarket.chef.io/cookbooks/sensu
Apache License 2.0
221 stars 280 forks source link

Add support for 'when' filter attributes #528

Closed hartmantis closed 7 years ago

hartmantis commented 7 years ago

Description

Because 'when' is also a reserved keyword in Ruby, that can't be the name of the new attribute on the filter resource. However, 'days' is the only valid attribute within the 'when' scope, so that seemed a decent option.

Motivation and Context

There is currently no way to place data in the 'when' attribute scope of a filter other than using the sensu_json_file resource directly.

How Has This Been Tested?

ChefSpec tests have been added and confirmed to pass.

Screenshots (if appropriate):

N/A

Types of changes

Checklist:

cwjohnston commented 7 years ago

Hi @RoboticCheese, thanks for this excellent pull request! I appreciate your efforts to add a new feature, complete with tests and a documentation example! 😻

At first glance I think this looks good, and I believe we may be able to include it in the impending 3.2.0 release.

portertech commented 7 years ago

90cc80c0-7afb-11e4-9130-b5de5f5b2ebf