Add TimingID in AttrActionPlan for corner case like *monthly_estimated

This commit is contained in:
TeoV
2020-07-17 10:41:33 +03:00
committed by Dan Christian Bogos
parent 58817d6a41
commit 817236abd8

View File

@@ -637,6 +637,7 @@ type AttrSetActionPlan struct {
type AttrActionPlan struct {
ActionsId string // Actions id
TimingID string // timingID is used to specify the ID of the timing for a corner case ( e.g. *monthly_estimated )
Years string // semicolon separated list of years this timing is valid on, *any or empty supported
Months string // semicolon separated list of months this timing is valid on, *any or empty supported
MonthDays string // semicolon separated list of month's days this timing is valid on, *any or empty supported
@@ -677,6 +678,7 @@ func (apierSv1 *APIerSv1) SetActionPlan(attrs *AttrSetActionPlan, reply *string)
if dfltTiming, isDefault := checkDefaultTiming(apiAtm.Time); isDefault {
timing = dfltTiming
} else {
timing.ID = apiAtm.TimingID
timing.Years.Parse(apiAtm.Years, ";")
timing.Months.Parse(apiAtm.Months, ";")
timing.MonthDays.Parse(apiAtm.MonthDays, ";")