blob: 9597f9a506f1697c17ae5f0e4986f9da10f33406 [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; }
Scott Bakerc9d3d842021-09-17 11:32:53 -070014 import onf-upf { prefix upf; }
Scott Baker3f1cb272021-10-26 14:28:05 -070015 import onf-site{ prefix st; }
Scott Bakerc9d3d842021-09-17 11:32:53 -070016
17 organization "Open Networking Foundation.";
18 contact "Scott Baker";
Scott Baker910f4062021-09-22 13:26:23 -070019 description
Scott Bakerc9d3d842021-09-17 11:32:53 -070020 "An Aether Virtual Cellular Service (VCS) is
21 used to connect devices with applications";
22
23 revision "2021-09-10" {
24 description "An Aether Virtual Cellular Service";
25 reference "RFC 6087";
26 }
27
28 typedef vcs-id {
29 type yg:yang-identifier {
30 length 1..32;
31 }
32 }
33
34 container vcs {
35 description "The top level container";
36
37 list vcs {
38 key "id";
39 description
40 "List of virtual cellular services";
41
42 leaf id {
43 type vcs-id;
44 description "ID for this vcs.";
45 }
46
47 leaf display-name {
48 type string {
49 length 1..80;
50 }
51 description "display name to use in GUI or CLI";
52 }
53
54 list device-group {
Scott Baker910f4062021-09-22 13:26:23 -070055 key "device-group";
Scott Bakerc9d3d842021-09-17 11:32:53 -070056 leaf device-group {
57 type leafref {
58 path "/dg:device-group/dg:device-group/dg:id";
Scott Baker910f4062021-09-22 13:26:23 -070059 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070060 description
Scott Baker910f4062021-09-22 13:26:23 -070061 "Link to device group";
Scott Bakerc9d3d842021-09-17 11:32:53 -070062 }
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
71 the VCS if the enable field is set to True";
Scott Baker910f4062021-09-22 13:26:23 -070072 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070073
Scott Baker36c96142021-10-19 14:13:30 -070074 leaf default-behavior {
75 type at:behavior;
76 mandatory true;
Scott Bakerc9d3d842021-09-17 11:32:53 -070077 description
Scott Baker36c96142021-10-19 14:13:30 -070078 "Default behavior if no filter rules match";
Scott Bakerc9d3d842021-09-17 11:32:53 -070079 }
80
Scott Baker910f4062021-09-22 13:26:23 -070081 list filter {
82 key "application";
Scott Bakerc9d3d842021-09-17 11:32:53 -070083 leaf application {
84 type leafref {
85 path "/app:application/app:application/app:id";
86 }
87 mandatory true;
88 description
89 "Link to application";
90 }
Scott Baker910f4062021-09-22 13:26:23 -070091 leaf priority {
Scott Baker36c96142021-10-19 14:13:30 -070092 type at:priority;
Scott Baker910f4062021-09-22 13:26:23 -070093 default 0;
94 description
95 "Priority of this application";
96 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070097 leaf allow {
98 type boolean;
99 default true;
100 description
101 "Allow or deny this application";
102 }
103 description
Scott Baker910f4062021-09-22 13:26:23 -0700104 "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 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700108
109 leaf upf {
110 type leafref {
111 path "/upf:upf/upf:upf/upf:id";
Scott Baker910f4062021-09-22 13:26:23 -0700112 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700113 description
114 "Link to user plane that implements this vcf";
115 }
116
117 leaf description {
118 type at:description;
119 description "description of this vcs";
120 }
121
122 leaf enterprise {
123 type leafref {
124 path "/ent:enterprise/ent:enterprise/ent:id";
125 }
126 mandatory true;
127 description
128 "Link to enterprise that owns this VCS";
Scott Baker910f4062021-09-22 13:26:23 -0700129 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700130
Scott Baker3f1cb272021-10-26 14:28:05 -0700131 leaf site {
132 type leafref {
133 path "/st:site/st:site/st:id";
134 }
135 description
136 "Link to site where this VCS is deployed";
137 mandatory true;
138 }
139
Scott Bakerc9d3d842021-09-17 11:32:53 -0700140 // the following are populated from the template
141 leaf sst {
142 type at:sst;
143 mandatory true;
144 description "Slice/Service type. Immutable.";
145 }
Scott Baker910f4062021-09-22 13:26:23 -0700146
Scott Bakerc9d3d842021-09-17 11:32:53 -0700147 leaf sd {
148 type at:sd;
149 mandatory true;
150 description "Slice differentiator. Immutable.";
151 }
152
Scott Bakerc9d3d842021-09-17 11:32:53 -0700153 container slice {
154 description "Per-Slice QOS Settings";
155 container mbr {
156 description "Maximum bitrate";
157 leaf uplink {
158 type at:bitrate;
159 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700160 description "Per-Slice MBR uplink data rate in bps";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700161 }
162
163 leaf downlink {
164 type at:bitrate;
165 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700166 description "Per-Slice MBR downlink data rate in bps";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700167 }
Scott Baker75ff25b2021-10-27 18:46:23 -0700168
169 leaf uplink-burst-size {
170 type at:burst;
171 units bytes;
172 description "Per-Slice Uplink burst size";
173 }
174
175 leaf downlink-burst-size {
176 type at:burst;
177 units bytes;
178 description "Per-Slice Downlink burst size";
179 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700180 }
181 }
182
Scott Bakerc9d3d842021-09-17 11:32:53 -0700183 // end of items populated from the template
184 }
Scott Baker910f4062021-09-22 13:26:23 -0700185 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700186}