Skip to content

Commit a7ec26f

Browse files
authored
Merge pull request #76 from netmod-wg/acee-review
Acee review
2 parents 1e45bbf + be4540e commit a7ec26f

File tree

2 files changed

+59
-32
lines changed

2 files changed

+59
-32
lines changed

draft-ietf-netmod-schedule-yang.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,15 @@ This document uses the YANG terminology defined in {{Section 3 of !RFC7950}}.
112112

113113
The document makes use of the following terms:
114114

115-
Recurrence Rule:
115+
Recurrence rule:
116116
: Refers to a rule or repeating pattern for recurring events. See also {{Section 3.8.5.3 of !RFC5545}} for a comprehensive iCalendar recurrence rule specification.
117117

118+
Recurrence instance (or Recurrence, for short):
119+
: Refers to an instance that matches a recurrence rule.
120+
121+
Recurrence set:
122+
: Refers to a set of recurrence instances.
123+
118124
Frequency:
119125
: Characterizes the type of a recurrence rule. Values are taken from "FREQ" rule in {{Section 3.3.10 of !RFC5545}}.
120126
: For example, repeating events based on an interval of a second or more are
@@ -125,7 +131,7 @@ iCalendar:
125131
: Refers to Internet Calendaring per {{!RFC5545}}.
126132

127133
Interval:
128-
: Refers to an integer that specifies at which interval a recurrence rule repeats. Values are taken from "INTERVAL" rule in {{Section 3.3.10 of !RFC5545}}.
134+
: Refers to an integer that specifies interval at which a recurrence rule repeats. Values are taken from "INTERVAL" rule in {{Section 3.3.10 of !RFC5545}}.
129135
: For example, "1", means every second for a secondly rule, every minute for a minutely rule, every hour for an hourly rule, etc.
130136

131137
System:
@@ -214,7 +220,7 @@ System:
214220
The "discard-action" parameter specifies the action if a requested schedule
215221
cannot be accepted for any reason and is discarded. Possible reasons include,
216222
but are not limited to, the requested schedule failing to satisfy the guards in this grouping,
217-
conflicting with existing schedules, or being out-of-date.
223+
conflicting with existing schedules, or being out-of-date (e.g., the expected start is already passed).
218224

219225
These parameters apply to all schedules on a system and are meant
220226
to provide guards against stale configuration, too short schedule requests
@@ -297,7 +303,7 @@ The interval specifies when a schedule will occur, combined with the frequency p
297303
an occurrence will last. This document allows the interval between occurrences to be shorter than the duration of each occurrence (e.g., a recurring event is scheduled to start every day for a duration of 2 days).
298304

299305
The repetition can be scoped by a specified end time or by a count of occurrences,
300-
indicated by the "recurrence-end" choice. The value of the "count" node MUST be greater than 1, the "start-time-utc" value always counts
306+
indicated by the "recurrence-end" choice. The "count" value MUST be greater than 1, the "start-time-utc" value always counts
301307
as the first occurrence.
302308

303309
The "recurrence-utc" grouping is designed to be reused in scheduling contexts
@@ -327,7 +333,7 @@ an occurrence will last. This document allows the interval between occurrences t
327333
values which are specified in the format of UTC or time zone offset to UTC.
328334

329335
The repetition can be scoped by a specified end time or by a count of occurrences,
330-
indicated by the "recurrence-end" choice. The value of the "count" node MUST be greater than 1, the "start-time" value always counts
336+
indicated by the "recurrence-end" choice. The "count" value MUST be greater than 1, the "start-time" value always counts
331337
as the first occurrence.
332338

333339
Unlike the definition of "recurrence-utc" grouping ({{sec-rec-utc}}),
@@ -1015,6 +1021,7 @@ after that time would not be considered as valid.
10151021
Other related efforts were explored in the past, e.g., {{?I-D.liu-netmod-yang-schedule}}.
10161022

10171023
Thanks to Reshad Rahman for the great YANG Doctors review, Mahesh Jethanandani for the AD review, Per Andersson for the OPSDIR review,
1018-
and Peter Yee for genart review.
1024+
Peter Yee for genart review, and Acee Lindem for the rtgdir review.
1025+
1026+
Thanks to Éric Vyncke and Erik Kline for the IESG review.
10191027

1020-
Thanks to Erik Kline for the IESG review.

yang/ietf-schedule.yang

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ module ietf-schedule {
154154
description
155155
"Indicates a one-shot schedule. That is a schedule that
156156
will trigger an action with the duration being specified as
157-
0/end time being specified the same as start time, and then
158-
the schedule will disable itself.";
157+
0 or end time being specified the same as start time,
158+
and then the schedule will disable itself.";
159159
}
160160

161161
identity period {
162162
base schedule-type;
163163
description
164-
"Indicates a period-based schedule consisting either a
164+
"Indicates a period-based schedule consisting of either a
165165
start and end or a start and positive duration of time. If
166166
neither an end nor a duration is indicated, the period is
167167
considered to last forever.";
@@ -254,7 +254,7 @@ module ietf-schedule {
254254
identity out-of-date {
255255
base schedule-state;
256256
description
257-
"Indicates a schedule with an out-of-date state.";
257+
"Indicates a schedule that is received out-of-date.";
258258
}
259259

260260
identity conflicted {
@@ -266,9 +266,9 @@ module ietf-schedule {
266266

267267
identity discard-action-type {
268268
description
269-
"Indicates the action for the responder to take when a
270-
requested schedule cannot be accepted for any reason
271-
and is discarded.";
269+
"Base identity for the action for the responder to take
270+
when a requested schedule cannot be accepted for any
271+
reason and is discarded.";
272272
}
273273

274274
identity warning {
@@ -376,12 +376,12 @@ module ietf-schedule {
376376
leaf time-zone-identifier {
377377
type sys:timezone-name;
378378
description
379-
"Indicates the identifier for the time zone in a time zone
380-
database. This parameter MUST be specified if either the
381-
'period-start' or 'period-end' value is reported in local
382-
time format. It MUST NOT be applied to date and time
383-
values which are specified in the format of UTC or time
384-
zone offset to UTC.";
379+
"Indicates the identifier for the time zone. This parameter
380+
MUST be specified if either the 'period-start' or
381+
'period-end' value is reported in local time format.
382+
It MUST NOT be applied to date and time values which are
383+
specified in the format of UTC or time zone offset
384+
to UTC.";
385385
}
386386
choice period-type {
387387
description
@@ -444,7 +444,7 @@ module ietf-schedule {
444444
"Frequency must be provided.";
445445
}
446446
description
447-
"A positive integer representing at which interval the
447+
"A positive integer representing interval at which the
448448
recurrence rule repeats. For example, within a 'daily'
449449
recurrence rule, a value of '8' means every eight days.";
450450
}
@@ -463,7 +463,7 @@ module ietf-schedule {
463463
leaf start-time-utc {
464464
type yang:date-and-time;
465465
description
466-
"Defines the instant date and time of the first instance
466+
"Defines the date and time of the first instance
467467
in the recurrence set. A UTC format MUST be used.";
468468
}
469469
leaf duration {
@@ -488,23 +488,23 @@ module ietf-schedule {
488488
type yang:date-and-time;
489489
description
490490
"This parameter specifies a date and time value to
491-
inclusively terminate the recurrence in UTC format. If
492-
the value specified by this parameter is synchronized
493-
with the specified recurrence, it becomes the last
494-
instance of the recurrence.";
491+
inclusively terminate the recurrence in UTC format. That
492+
is, if the value specified by this parameter is
493+
synchronized with the specified recurrence rule,
494+
it becomes the last instance of the recurrence rule.";
495495
}
496496
}
497497
case count {
498498
description
499499
"This case defines the number of occurrences at which
500-
to terminate the recurrence.";
500+
to terminate the recurrence rule.";
501501
leaf count {
502502
type uint32 {
503503
range "1..max";
504504
}
505505
description
506506
"The positive number of occurrences at which to
507-
terminate the recurrence.";
507+
terminate the recurrence rule.";
508508
}
509509
}
510510
}
@@ -524,7 +524,7 @@ module ietf-schedule {
524524
leaf start-time {
525525
type yang:date-and-time;
526526
description
527-
"Defines the instant date and time of the first instance
527+
"Defines the date and time of the first instance
528528
in the recurrence set.";
529529
}
530530
leaf duration {
@@ -553,7 +553,7 @@ module ietf-schedule {
553553
forever.";
554554
case until {
555555
description
556-
"The end of the recurrence is indicated by a specific
556+
"The end of the recurrence rule is indicated by a specific
557557
date-and-time value.";
558558
leaf until {
559559
type yang:date-and-time;
@@ -624,8 +624,27 @@ module ietf-schedule {
624624
}
625625
leaf period-end {
626626
type yang:timeticks;
627+
must "(not(derived-from(../../frequency,"
628+
+ "'schedule:secondly')) or (current() < 100)) and "
629+
+ "(not(derived-from(../../frequency,"
630+
+ "'schedule:minutely')) or (current() < 6000)) and "
631+
+ "(not(derived-from(../../frequency,'schedule:hourly'))"
632+
+ " or (current() < 360000)) and "
633+
+ "(not(derived-from(../../frequency,'schedule:daily'))"
634+
+ " or (current() < 8640000)) and "
635+
+ "(not(derived-from(../../frequency,'schedule:weekly'))"
636+
+ " or (current() < 60480000)) and "
637+
+ "(not(derived-from(../../frequency,"
638+
+ "'schedule:monthly')) or (current() < 267840000)) and "
639+
+ "(not(derived-from(../../frequency,'schedule:yearly'))"
640+
+ " or (current() < 3162240000))" {
641+
error-message
642+
"The period-end must not exceed the frequency
643+
interval.";
644+
}
627645
description
628-
"End time of the schedule within one recurrence.";
646+
"End time of the schedule within one recurrence.
647+
The period start MUST be no later than the end.";
629648
}
630649
}
631650
}
@@ -736,7 +755,8 @@ module ietf-schedule {
736755
"Specifies a list of values that corresponds to the nth
737756
occurrence within the set of recurrence instances
738757
specified by the rule. It must only be used in conjunction
739-
with another by the rule part.";
758+
with another 'byxxx' (bysecond, byminute, etc.) rule
759+
part .";
740760
}
741761
leaf workweek-start {
742762
type schedule:weekday;

0 commit comments

Comments
 (0)