Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
| 3 | // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | module 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"; |
| 20 | description |
| 21 | "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 { |
| 56 | key "device-group"; |
| 57 | leaf device-group { |
| 58 | type leafref { |
| 59 | path "/dg:device-group/dg:device-group/dg:id"; |
| 60 | } |
| 61 | description |
| 62 | "Link to device group"; |
| 63 | } |
| 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"; |
| 73 | } |
| 74 | |
| 75 | leaf template { |
| 76 | type leafref { |
| 77 | path "/vt:template/vt:template/vt:id"; |
| 78 | } |
| 79 | description |
| 80 | "Link to user vcs template that was used to initialize |
| 81 | this VCS"; |
| 82 | } |
| 83 | |
| 84 | list application { |
| 85 | key "application"; |
| 86 | leaf application { |
| 87 | type leafref { |
| 88 | path "/app:application/app:application/app:id"; |
| 89 | } |
| 90 | mandatory true; |
| 91 | description |
| 92 | "Link to application"; |
| 93 | } |
| 94 | leaf allow { |
| 95 | type boolean; |
| 96 | default true; |
| 97 | description |
| 98 | "Allow or deny this application"; |
| 99 | } |
| 100 | description |
| 101 | "An ordered list of applications to allow and deny. The deny rules |
| 102 | will be executed first, followed by the allow rules. The first rule |
| 103 | to match is returned. An implicit DENY ALL lies at the end."; |
| 104 | } |
| 105 | |
| 106 | leaf upf { |
| 107 | type leafref { |
| 108 | path "/upf:upf/upf:upf/upf:id"; |
| 109 | } |
| 110 | description |
| 111 | "Link to user plane that implements this vcf"; |
| 112 | } |
| 113 | |
| 114 | leaf description { |
| 115 | type at:description; |
| 116 | description "description of this vcs"; |
| 117 | } |
| 118 | |
| 119 | leaf enterprise { |
| 120 | type leafref { |
| 121 | path "/ent:enterprise/ent:enterprise/ent:id"; |
| 122 | } |
| 123 | mandatory true; |
| 124 | description |
| 125 | "Link to enterprise that owns this VCS"; |
| 126 | } |
| 127 | |
| 128 | // the following are populated from the template |
| 129 | leaf sst { |
| 130 | type at:sst; |
| 131 | mandatory true; |
| 132 | description "Slice/Service type. Immutable."; |
| 133 | } |
| 134 | |
| 135 | leaf sd { |
| 136 | type at:sd; |
| 137 | mandatory true; |
| 138 | description "Slice differentiator. Immutable."; |
| 139 | } |
| 140 | |
| 141 | container device { |
| 142 | description "Per-device QOS Settings"; |
| 143 | container mbr { |
| 144 | description "Maximum bitrate"; |
| 145 | leaf uplink { |
| 146 | type at:bitrate; |
| 147 | units bps; |
| 148 | description "Per-device mbr uplink data rate in mbps"; |
| 149 | } |
| 150 | |
| 151 | leaf downlink { |
| 152 | type at:bitrate; |
| 153 | units bps; |
| 154 | description "Per-device mbr downlink data rate in mbps"; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | container slice { |
| 160 | description "Per-Slice QOS Settings"; |
| 161 | container mbr { |
| 162 | description "Maximum bitrate"; |
| 163 | leaf uplink { |
| 164 | type at:bitrate; |
| 165 | units bps; |
| 166 | description "Per-Slice mbr uplink data rate in mbps"; |
| 167 | } |
| 168 | |
| 169 | leaf downlink { |
| 170 | type at:bitrate; |
| 171 | units bps; |
| 172 | description "Per-Slice mbr downlink data rate in mbps"; |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | leaf traffic-class { |
| 178 | type leafref { |
| 179 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 180 | } |
| 181 | mandatory true; |
| 182 | description |
| 183 | "Link to traffic class"; |
| 184 | } |
| 185 | // end of items populated from the template |
| 186 | } |
| 187 | } |
| 188 | } |