blob: 7373d1b81a561a340fb284b6d36e111940794f9a [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; }
Scott Bakerc9d3d842021-09-17 11:32:53 -070015 import onf-upf { prefix upf; }
16
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
131 // the following are populated from the template
132 leaf sst {
133 type at:sst;
134 mandatory true;
135 description "Slice/Service type. Immutable.";
136 }
Scott Baker910f4062021-09-22 13:26:23 -0700137
Scott Bakerc9d3d842021-09-17 11:32:53 -0700138 leaf sd {
139 type at:sd;
140 mandatory true;
141 description "Slice differentiator. Immutable.";
142 }
143
Scott Bakerc9d3d842021-09-17 11:32:53 -0700144 container slice {
145 description "Per-Slice QOS Settings";
146 container mbr {
147 description "Maximum bitrate";
148 leaf uplink {
149 type at:bitrate;
150 units bps;
151 description "Per-Slice mbr uplink data rate in mbps";
152 }
153
154 leaf downlink {
155 type at:bitrate;
156 units bps;
157 description "Per-Slice mbr downlink data rate in mbps";
158 }
159 }
160 }
161
Scott Bakerc9d3d842021-09-17 11:32:53 -0700162 // end of items populated from the template
163 }
Scott Baker910f4062021-09-22 13:26:23 -0700164 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700165}