blob: 98bfdd88b60c38f9d318bc84f8b97fde92a10636 [file] [log] [blame]
Scott Bakerfdbad762022-01-03 16:00:45 -08001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
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;
Scott Bakerfdbad762022-01-03 16:00:45 -080014
15 organization "Open Networking Foundation.";
16 contact "Scott Baker";
17 description
Sean Condon24297da2022-01-27 09:50:34 +000018 "An Aether Slice is
Scott Bakerfdbad762022-01-03 16:00:45 -080019 used to connect devices with applications";
20
Sean Condon11d6f422022-01-14 13:02:03 +000021 revision "2022-01-14" {
22 description "Refactored as submodule";
23 reference "RFC 6020";
24 }
25
Scott Bakerfdbad762022-01-03 16:00:45 -080026 revision "2021-09-10" {
Sean Condon24297da2022-01-27 09:50:34 +000027 description "An Aether Slice";
Scott Bakerfdbad762022-01-03 16:00:45 -080028 reference "RFC 6087";
29 }
30
Sean Condon24297da2022-01-27 09:50:34 +000031 typedef slice-id {
Scott Bakerfdbad762022-01-03 16:00:45 -080032 type yg:yang-identifier {
33 length 1..32;
34 }
Sean Condon24297da2022-01-27 09:50:34 +000035 description "The typedef for slice-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080036 }
37
Sean Condon24297da2022-01-27 09:50:34 +000038 grouping slice {
39 description "The slice grouping";
Scott Bakerfdbad762022-01-03 16:00:45 -080040
Sean Condon24297da2022-01-27 09:50:34 +000041 list slice {
42 key "slice-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080043 description
Sean Condon24297da2022-01-27 09:50:34 +000044 "List of Slices";
Scott Bakerfdbad762022-01-03 16:00:45 -080045
Sean Condon24297da2022-01-27 09:50:34 +000046 leaf slice-id {
47 type slice-id;
48 description "ID for this slice.";
Scott Bakerfdbad762022-01-03 16:00:45 -080049 }
50
51 leaf display-name {
52 type string {
53 length 1..80;
54 }
55 description "display name to use in GUI or CLI";
56 }
57
58 list device-group {
59 key "device-group";
60 leaf device-group {
61 type leafref {
Sean Condon11d6f422022-01-14 13:02:03 +000062 path "../../../device-group/dg-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080063 }
64 description
65 "Link to device group";
66 }
67 leaf enable {
68 type boolean;
69 default true;
70 description
71 "Enable this device group";
72 }
73 description
74 "A list of device groups. Groups will only participate in
Sean Condon24297da2022-01-27 09:50:34 +000075 the Slice if the enable field is set to True";
Scott Bakerfdbad762022-01-03 16:00:45 -080076 }
77
78 leaf default-behavior {
79 type at:behavior;
80 mandatory true;
81 description
82 "Default behavior if no filter rules match";
83 }
84
85 list filter {
86 key "application";
87 leaf application {
88 type leafref {
Sean Condon11d6f422022-01-14 13:02:03 +000089 path "../../../../application/app-id";
Scott Bakerfdbad762022-01-03 16:00:45 -080090 }
91 mandatory true;
92 description
93 "Link to application";
94 }
95 leaf priority {
96 type at:priority;
97 default 0;
98 description
99 "Priority of this application";
100 }
101 leaf allow {
102 type boolean;
103 default true;
104 description
105 "Allow or deny this application";
106 }
107 description
108 "A list of applications to allow and/or deny. Rules are executed in
109 priority order. The first rule to match will determine the fate
110 of the packet.";
111 }
112
113 leaf upf {
114 type leafref {
Sean Condon11d6f422022-01-14 13:02:03 +0000115 path "../../upf/upf-id";
Scott Bakerfdbad762022-01-03 16:00:45 -0800116 }
117 description
118 "Link to user plane that implements this vcf";
119 }
120
121 leaf description {
122 type at:description;
Sean Condon24297da2022-01-27 09:50:34 +0000123 description "description of this slice";
Scott Bakerfdbad762022-01-03 16:00:45 -0800124 }
125
Scott Bakerfdbad762022-01-03 16:00:45 -0800126 // the following are populated from the template
127 leaf sst {
128 type at:sst;
129 mandatory true;
130 description "Slice/Service type. Immutable.";
131 }
132
133 leaf sd {
134 type at:sd;
135 mandatory true;
136 description "Slice differentiator. Immutable.";
137 }
138
Sean Condon24297da2022-01-27 09:50:34 +0000139 container mbr {
140 description "Per slice Maximum Bit Rate";
141 leaf uplink {
142 type at:bitrate;
143 units bps;
144 description "Per-Slice MBR uplink data rate in bps";
145 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800146
Sean Condon24297da2022-01-27 09:50:34 +0000147 leaf downlink {
148 type at:bitrate;
149 units bps;
150 description "Per-Slice MBR downlink data rate in bps";
151 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800152
Sean Condon24297da2022-01-27 09:50:34 +0000153 leaf uplink-burst-size {
154 type at:burst;
155 units bytes;
156 description "Per-Slice Uplink burst size";
157 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800158
Sean Condon24297da2022-01-27 09:50:34 +0000159 leaf downlink-burst-size {
160 type at:burst;
161 units bytes;
162 description "Per-Slice Downlink burst size";
Scott Bakerfdbad762022-01-03 16:00:45 -0800163 }
164 }
165
166 // end of items populated from the template
167 }
168 }
169}