tas50/nagios — pull request #236 by messick (2014-01-16 19:42:22+00:00)
Title: [COOK-4224] Use an array to define Time Period times

Currently a comma delimited string is used to define "times" for a timeperiod. However, commas are valid characters for the definitions themselves.

For example, the following is valid a Nagios timeperiod definition, but it is not possible to define with current cookbook because the commas would be used to split the string:

```
define timeperiod {
timeperiod_name primetime
alias When things are normal
sunday 00:00-06:00,12:00-24:00
monday 00:00-06:00,12:00-24:00
tuesday 00:00-06:00,12:00-24:00
wednesday 00:00-06:00,12:00-24:00
thursday 00:00-06:00,12:00-24:00
friday 00:00-06:00,12:00-24:00
saturday 00:00-06:00,12:00-24:00
}
```
Using an array to define the "times" inside the nagios_timeperiods data bag will solve this issue.

I updated the README example, but here it is so you can see the array:

```javascript
{
"id": "time_period_name",
"alias": "This time period goes from now to then",
"times": [
"sunday 09:00-17:00",
"monday 09:00-17:00",
"tuesday 09:00-17:00",
"wednesday 09:00-17:00",
"thursday 09:00-17:00",
"friday 09:00-17:00",
"saturday 09:00-17:00"
]
}
```