blob: f59619a15edd8e3ca892726950dd573f84487987 [file] [log] [blame]
Scott Bakerfdbad762022-01-03 16:00:45 -08001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Bakerfdbad762022-01-03 16:00:45 -08004
Sean Condon24297da2022-01-27 09:50:34 +00005submodule onf-slice {
Sean Condon11d6f422022-01-14 13:02:03 +00006 belongs-to onf-enterprise { prefix ent; }
Scott Bakerfdbad762022-01-03 16:00:45 -08007
8 import ietf-yang-types{ prefix yg; }
9 import onf-aether-types{ prefix at; }
Sean Condon11d6f422022-01-14 13:02:03 +000010
11 include onf-upf;
12 include onf-device-group;
13 include onf-application;
Sean Condon9f7966e2022-02-03 10:55:06 +000014 include onf-priority-traffic-rule;
Scott Bakerfdbad762022-01-03 16:00:45 -080015
16 organization "Open Networking Foundation.";
17 contact "Scott Baker";
18 description
Sean Condon24297da2022-01-27 09:50:34 +000019 "An Aether Slice is
Scott Bakerfdbad762022-01-03 16:00:45 -080020 used to connect devices with applications";
21
Sean Condon11d6f422022-01-14 13:02:03 +000022 revision "2022-01-14" {
23 description "Refactored as submodule";
24 reference "RFC 6020";
25 }
26
Scott Bakerfdbad762022-01-03 16:00:45 -080027 revision "2021-09-10" {
Sean Condon24297da2022-01-27 09:50:34 +000028 description "An Aether Slice";
Scott Bakerfdbad762022-01-03 16:00:45 -080029 reference "RFC 6087";
30 }
31
Sean Condon24297da2022-01-27 09:50:34 +000032 typedef slice-id {
Scott Bakerfdbad762022-01-03 16:00:45 -080033 type yg:yang-identifier {
34 length 1..32;
35 }
Sean Condon24297da2022-01-27 09:50:34 +000036 description "The typedef for slice-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080037 }
38
Sean Condon24297da2022-01-27 09:50:34 +000039 grouping slice {
40 description "The slice grouping";
Scott Bakerfdbad762022-01-03 16:00:45 -080041
Sean Condon24297da2022-01-27 09:50:34 +000042 list slice {
43 key "slice-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080044 description
Sean Condon24297da2022-01-27 09:50:34 +000045 "List of Slices";
Scott Bakerfdbad762022-01-03 16:00:45 -080046
Sean Condon24297da2022-01-27 09:50:34 +000047 leaf slice-id {
48 type slice-id;
49 description "ID for this slice.";
Scott Bakerfdbad762022-01-03 16:00:45 -080050 }
51
Sean Condon9f7966e2022-02-03 10:55:06 +000052 uses at:desc-display-name;
Scott Bakerfdbad762022-01-03 16:00:45 -080053
54 list device-group {
55 key "device-group";
56 leaf device-group {
57 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000058 path "../../../device-group/device-group-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080059 }
60 description
61 "Link to device group";
62 }
63 leaf enable {
64 type boolean;
65 default true;
66 description
67 "Enable this device group";
68 }
69 description
70 "A list of device groups. Groups will only participate in
Sean Condon24297da2022-01-27 09:50:34 +000071 the Slice if the enable field is set to True";
Scott Bakerfdbad762022-01-03 16:00:45 -080072 }
73
74 leaf default-behavior {
75 type at:behavior;
76 mandatory true;
77 description
78 "Default behavior if no filter rules match";
79 }
80
81 list filter {
82 key "application";
83 leaf application {
84 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000085 path "../../../../application/application-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080086 }
87 mandatory true;
88 description
89 "Link to application";
90 }
91 leaf priority {
92 type at:priority;
93 default 0;
94 description
95 "Priority of this application";
96 }
97 leaf allow {
98 type boolean;
99 default true;
100 description
101 "Allow or deny this application";
102 }
103 description
104 "A list of applications to allow and/or deny. Rules are executed in
105 priority order. The first rule to match will determine the fate
106 of the packet.";
107 }
108
109 leaf upf {
110 type leafref {
Sean Condon11d6f422022-01-14 13:02:03 +0000111 path "../../upf/upf-id";
Scott Bakerfdbad762022-01-03 16:00:45 -0800112 }
113 description
114 "Link to user plane that implements this vcf";
115 }
116
Scott Bakerfdbad762022-01-03 16:00:45 -0800117 // the following are populated from the template
118 leaf sst {
119 type at:sst;
120 mandatory true;
121 description "Slice/Service type. Immutable.";
122 }
123
124 leaf sd {
125 type at:sd;
126 mandatory true;
127 description "Slice differentiator. Immutable.";
128 }
129
Sean Condon24297da2022-01-27 09:50:34 +0000130 container mbr {
131 description "Per slice Maximum Bit Rate";
132 leaf uplink {
133 type at:bitrate;
134 units bps;
135 description "Per-Slice MBR uplink data rate in bps";
136 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800137
Sean Condon24297da2022-01-27 09:50:34 +0000138 leaf downlink {
139 type at:bitrate;
140 units bps;
141 description "Per-Slice MBR downlink data rate in bps";
142 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800143
Sean Condon24297da2022-01-27 09:50:34 +0000144 leaf uplink-burst-size {
145 type at:burst;
146 units bytes;
147 description "Per-Slice Uplink burst size";
148 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800149
Sean Condon24297da2022-01-27 09:50:34 +0000150 leaf downlink-burst-size {
151 type at:burst;
152 units bytes;
153 description "Per-Slice Downlink burst size";
Scott Bakerfdbad762022-01-03 16:00:45 -0800154 }
155 }
156
157 // end of items populated from the template
Sean Condon9f7966e2022-02-03 10:55:06 +0000158 uses priority-traffic-rule;
159
Scott Bakerfdbad762022-01-03 16:00:45 -0800160 }
161 }
162}