blob: c27556519a6614773db9b50f4b1d4a72431156a1 [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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000032 description "The typedef for vcs-id";
Scott Bakerc9d3d842021-09-17 11:32:53 -070033 }
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
Scott Baker36c96142021-10-19 14:13:30 -070075 leaf default-behavior {
76 type at:behavior;
77 mandatory true;
Scott Bakerc9d3d842021-09-17 11:32:53 -070078 description
Scott Baker36c96142021-10-19 14:13:30 -070079 "Default behavior if no filter rules match";
Scott Bakerc9d3d842021-09-17 11:32:53 -070080 }
81
Scott Baker910f4062021-09-22 13:26:23 -070082 list filter {
83 key "application";
Scott Bakerc9d3d842021-09-17 11:32:53 -070084 leaf application {
85 type leafref {
86 path "/app:application/app:application/app:id";
87 }
88 mandatory true;
89 description
90 "Link to application";
91 }
Scott Baker910f4062021-09-22 13:26:23 -070092 leaf priority {
Scott Baker36c96142021-10-19 14:13:30 -070093 type at:priority;
Scott Baker910f4062021-09-22 13:26:23 -070094 default 0;
95 description
96 "Priority of this application";
97 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070098 leaf allow {
99 type boolean;
100 default true;
101 description
102 "Allow or deny this application";
103 }
104 description
Scott Baker910f4062021-09-22 13:26:23 -0700105 "A list of applications to allow and/or deny. Rules are executed in
106 priority order. The first rule to match will determine the fate
107 of the packet.";
108 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700109
110 leaf upf {
111 type leafref {
112 path "/upf:upf/upf:upf/upf:id";
Scott Baker910f4062021-09-22 13:26:23 -0700113 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700114 description
115 "Link to user plane that implements this vcf";
116 }
117
118 leaf description {
119 type at:description;
120 description "description of this vcs";
121 }
122
123 leaf enterprise {
124 type leafref {
125 path "/ent:enterprise/ent:enterprise/ent:id";
126 }
127 mandatory true;
128 description
129 "Link to enterprise that owns this VCS";
Scott Baker910f4062021-09-22 13:26:23 -0700130 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700131
Scott Baker3f1cb272021-10-26 14:28:05 -0700132 leaf site {
133 type leafref {
134 path "/st:site/st:site/st:id";
135 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000136 mandatory true;
Scott Baker3f1cb272021-10-26 14:28:05 -0700137 description
138 "Link to site where this VCS is deployed";
Scott Baker3f1cb272021-10-26 14:28:05 -0700139 }
140
Scott Bakerc9d3d842021-09-17 11:32:53 -0700141 // the following are populated from the template
142 leaf sst {
143 type at:sst;
144 mandatory true;
145 description "Slice/Service type. Immutable.";
146 }
Scott Baker910f4062021-09-22 13:26:23 -0700147
Scott Bakerc9d3d842021-09-17 11:32:53 -0700148 leaf sd {
149 type at:sd;
150 mandatory true;
151 description "Slice differentiator. Immutable.";
152 }
153
Scott Bakerc9d3d842021-09-17 11:32:53 -0700154 container slice {
155 description "Per-Slice QOS Settings";
156 container mbr {
157 description "Maximum bitrate";
158 leaf uplink {
159 type at:bitrate;
160 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700161 description "Per-Slice MBR uplink data rate in bps";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700162 }
163
164 leaf downlink {
165 type at:bitrate;
166 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700167 description "Per-Slice MBR downlink data rate in bps";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700168 }
Scott Baker75ff25b2021-10-27 18:46:23 -0700169
170 leaf uplink-burst-size {
171 type at:burst;
172 units bytes;
173 description "Per-Slice Uplink burst size";
174 }
175
176 leaf downlink-burst-size {
177 type at:burst;
178 units bytes;
179 description "Per-Slice Downlink burst size";
180 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700181 }
182 }
183
Scott Bakerc9d3d842021-09-17 11:32:53 -0700184 // end of items populated from the template
185 }
Scott Baker910f4062021-09-22 13:26:23 -0700186 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700187}