blob: 183d6f6300a048c4bcc749d3b746c1ccf5ec518e [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
Scott Bakercd276412021-10-13 14:31:24 -0700147 // This is deprecated. Per-device QOS is moving
148 // to DG.
Scott Bakerc9d3d842021-09-17 11:32:53 -0700149 container device {
150 description "Per-device QOS Settings";
151 container mbr {
152 description "Maximum bitrate";
153 leaf uplink {
154 type at:bitrate;
155 units bps;
156 description "Per-device mbr uplink data rate in mbps";
157 }
158
159 leaf downlink {
160 type at:bitrate;
161 units bps;
162 description "Per-device mbr downlink data rate in mbps";
163 }
164 }
165 }
166
167 container slice {
168 description "Per-Slice QOS Settings";
169 container mbr {
170 description "Maximum bitrate";
171 leaf uplink {
172 type at:bitrate;
173 units bps;
174 description "Per-Slice mbr uplink data rate in mbps";
175 }
176
177 leaf downlink {
178 type at:bitrate;
179 units bps;
180 description "Per-Slice mbr downlink data rate in mbps";
181 }
182 }
183 }
184
185 leaf traffic-class {
186 type leafref {
187 path "/tc:traffic-class/tc:traffic-class/tc:id";
188 }
189 mandatory true;
190 description
191 "Link to traffic class";
192 }
193 // end of items populated from the template
194 }
Scott Baker910f4062021-09-22 13:26:23 -0700195 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700196}