blob: db0e99315d6d9ba750fede8db0900c6184b4ac8e [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5module onf-vcs {
6 namespace "http://opennetworking.org/aether/vcs";
7 prefix sl;
8
9 import ietf-yang-types{ prefix yg; }
10 import onf-aether-types{ prefix at; }
11 import onf-application{ prefix app; }
12 import onf-device-group{ prefix dg; }
13 import onf-enterprise{ prefix ent; }
14 import onf-template{ prefix vt; }
15 import onf-traffic-class{ prefix tc; }
16 import onf-upf { prefix upf; }
17
18 organization "Open Networking Foundation.";
19 contact "Scott Baker";
Scott Baker910f4062021-09-22 13:26:23 -070020 description
Scott Bakerc9d3d842021-09-17 11:32:53 -070021 "An Aether Virtual Cellular Service (VCS) is
22 used to connect devices with applications";
23
24 revision "2021-09-10" {
25 description "An Aether Virtual Cellular Service";
26 reference "RFC 6087";
27 }
28
29 typedef vcs-id {
30 type yg:yang-identifier {
31 length 1..32;
32 }
33 }
34
35 container vcs {
36 description "The top level container";
37
38 list vcs {
39 key "id";
40 description
41 "List of virtual cellular services";
42
43 leaf id {
44 type vcs-id;
45 description "ID for this vcs.";
46 }
47
48 leaf display-name {
49 type string {
50 length 1..80;
51 }
52 description "display name to use in GUI or CLI";
53 }
54
55 list device-group {
Scott Baker910f4062021-09-22 13:26:23 -070056 key "device-group";
Scott Bakerc9d3d842021-09-17 11:32:53 -070057 leaf device-group {
58 type leafref {
59 path "/dg:device-group/dg:device-group/dg:id";
Scott Baker910f4062021-09-22 13:26:23 -070060 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070061 description
Scott Baker910f4062021-09-22 13:26:23 -070062 "Link to device group";
Scott Bakerc9d3d842021-09-17 11:32:53 -070063 }
64 leaf enable {
65 type boolean;
66 default true;
67 description
68 "Enable this device group";
69 }
70 description
71 "A list of device groups. Groups will only participate in
72 the VCS if the enable field is set to True";
Scott Baker910f4062021-09-22 13:26:23 -070073 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070074
75 leaf template {
76 type leafref {
77 path "/vt:template/vt:template/vt:id";
Scott Baker910f4062021-09-22 13:26:23 -070078 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070079 description
80 "Link to user vcs template that was used to initialize
81 this VCS";
82 }
83
Scott Baker910f4062021-09-22 13:26:23 -070084 list filter {
85 key "application";
Scott Bakerc9d3d842021-09-17 11:32:53 -070086 leaf application {
87 type leafref {
88 path "/app:application/app:application/app:id";
89 }
90 mandatory true;
91 description
92 "Link to application";
93 }
Scott Baker910f4062021-09-22 13:26:23 -070094 leaf priority {
95 type uint8;
96 default 0;
97 description
98 "Priority of this application";
99 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700100 leaf allow {
101 type boolean;
102 default true;
103 description
104 "Allow or deny this application";
105 }
106 description
Scott Baker910f4062021-09-22 13:26:23 -0700107 "A list of applications to allow and/or deny. Rules are executed in
108 priority order. The first rule to match will determine the fate
109 of the packet.";
110 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700111
112 leaf upf {
113 type leafref {
114 path "/upf:upf/upf:upf/upf:id";
Scott Baker910f4062021-09-22 13:26:23 -0700115 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700116 description
117 "Link to user plane that implements this vcf";
118 }
119
120 leaf description {
121 type at:description;
122 description "description of this vcs";
123 }
124
125 leaf enterprise {
126 type leafref {
127 path "/ent:enterprise/ent:enterprise/ent:id";
128 }
129 mandatory true;
130 description
131 "Link to enterprise that owns this VCS";
Scott Baker910f4062021-09-22 13:26:23 -0700132 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700133
134 // the following are populated from the template
135 leaf sst {
136 type at:sst;
137 mandatory true;
138 description "Slice/Service type. Immutable.";
139 }
Scott Baker910f4062021-09-22 13:26:23 -0700140
Scott Bakerc9d3d842021-09-17 11:32:53 -0700141 leaf sd {
142 type at:sd;
143 mandatory true;
144 description "Slice differentiator. Immutable.";
145 }
146
147 container device {
148 description "Per-device QOS Settings";
149 container mbr {
150 description "Maximum bitrate";
151 leaf uplink {
152 type at:bitrate;
153 units bps;
154 description "Per-device mbr uplink data rate in mbps";
155 }
156
157 leaf downlink {
158 type at:bitrate;
159 units bps;
160 description "Per-device mbr downlink data rate in mbps";
161 }
162 }
163 }
164
165 container slice {
166 description "Per-Slice QOS Settings";
167 container mbr {
168 description "Maximum bitrate";
169 leaf uplink {
170 type at:bitrate;
171 units bps;
172 description "Per-Slice mbr uplink data rate in mbps";
173 }
174
175 leaf downlink {
176 type at:bitrate;
177 units bps;
178 description "Per-Slice mbr downlink data rate in mbps";
179 }
180 }
181 }
182
183 leaf traffic-class {
184 type leafref {
185 path "/tc:traffic-class/tc:traffic-class/tc:id";
186 }
187 mandatory true;
188 description
189 "Link to traffic class";
190 }
191 // end of items populated from the template
192 }
Scott Baker910f4062021-09-22 13:26:23 -0700193 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700194}