Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 94 additions & 44 deletions yang/appendix-a-examples
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ module example-sch-usage-1 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using 'generic-schedule-params' and
'schedule-status' groupings.";

revision "2026-02-20" {
description "Initial version.";
Expand All @@ -18,11 +24,13 @@ module example-sch-usage-1 {
}

container generic-schedule-params {
description "A description.";
description
"A collection of generic scheduling parameters.";
uses schedule:generic-schedule-params;
}
container schedule-status {
description "A description.";
description
"A collection of scheduling status.";
uses schedule:schedule-status;
}
}
Expand All @@ -32,22 +40,28 @@ module example-sch-usage-2 {
namespace "http://example.com/example-sch-usage-2";
prefix "ex-schu2";

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
import ietf-schedule {
prefix "schedule";
}

organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'period-of-time' grouping.";

revision "2026-02-20" {
description "Initial version.";
reference
"RFC 9922: A YANG Data Model for Scheduling.";
}

import ietf-schedule {
prefix "schedule";
}

container period-of-time {
description "A description.";
description
"A container for a time period.";
uses schedule:period-of-time;
}
}
Expand All @@ -61,9 +75,14 @@ module example-sch-usage-3 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'recurrence-basic' grouping.";

revision "2026-02-20" {
description "Initial version.";
Expand All @@ -72,12 +91,9 @@ module example-sch-usage-3 {
}

container recurrence-basic {
description "A description.";
description
"A container for a simple recurrence rule.";
uses schedule:recurrence-basic {
description "A description.";
refine frequency {
mandatory true;
}
refine interval {
default 1;
}
Expand All @@ -94,9 +110,14 @@ module example-sch-usage-4 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'recurrence-utc' grouping.";

revision "2026-02-20" {
description "Initial version.";
Expand All @@ -105,7 +126,8 @@ module example-sch-usage-4 {
}

container recurrence-utc {
description "A description.";
description
"A container for a simple recurrence rule in UTC format.";
uses schedule:recurrence-utc;
}
}
Expand All @@ -119,9 +141,15 @@ module example-sch-usage-5 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'recurrence-with-time-zone'
grouping.";

revision "2026-02-20" {
description "Initial version.";
Expand All @@ -130,7 +158,8 @@ module example-sch-usage-5 {
}

container recurrence-with-time-zone {
description "A description.";
description
"A container for a simple recurrence rule with a time zone.";
uses schedule:recurrence-with-time-zone;
}
}
Expand All @@ -144,18 +173,26 @@ module example-sch-usage-6 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'recurrence-utc-with-periods'
grouping.";

revision "2026-02-20" {
description "Initial version.";
reference
"RFC 9922: A YANG Data Model for Scheduling.";
}

container recurrence-utc-with-date-times {
description "A description.";
container recurrence-utc-with-periods {
description
"A container for an aggregate set of repeating occurrences in
UTC format.";
uses schedule:recurrence-utc-with-periods;
}
}
Expand All @@ -169,18 +206,26 @@ module example-sch-usage-7 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using the 'recurrence-time-zone-with-periods'
grouping.";

revision "2026-02-20" {
description "Initial version.";
reference
"RFC 9922: A YANG Data Model for Scheduling.";
}

container recurrence-time-zone-with-date-times {
description "A description.";
container recurrence-time-zone-with-periods {
description
"A container for an aggregate set of repeating occurrences
with a time zone.";
uses schedule:recurrence-time-zone-with-periods;
}
}
Expand All @@ -194,9 +239,14 @@ module example-sch-usage-8 {
prefix "schedule";
}

organization "Example, Inc.";
contact "Support at example.com";
description "An example.";
organization
"Example, Inc.";

contact
"Support at example.com";

description
"Example of a module using 'icalendar-recurrence' grouping.";

revision "2026-02-20" {
description "Initial version.";
Expand All @@ -205,9 +255,9 @@ module example-sch-usage-8 {
}

container icalendar-recurrence {
description "A description.";
description
"A container for a scheduled iCalendar recurrence.";
uses schedule:icalendar-recurrence {
description "A description.";
refine workweek-start {
default monday;
}
Expand Down
26 changes: 26 additions & 0 deletions yang/example-sch-capacity-res.yang
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,44 @@ module example-sch-capacity-res {
prefix "schedule";
}

organization
"Example, Inc.";

contact
"Support at example.com";

description
"An example to show a scheduled link capacity reservation.";

revision "2026-02-20" {
description
"Initial version.";
reference
"RFC 9922: A YANG Data Model for Scheduling";
}

container link-capability-reservations {
description
"A container for a scheduled link capability reservations";
list scheduled-link-capacity {
key "schedule-id";
description
"Definition of scheduled link capacity list";
leaf schedule-id {
type string;
description
"The schedule identifier for this schedule rule.";
}
leaf link-id {
type nt:link-id;
description
"The identifier of a link in the topology.";
}
leaf reserved-capability {
type uint64;
units "Mbps";
description
"The reserved capability for a particular link.";
}
uses schedule:period-of-time;
}
Expand Down