Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [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-upf { prefix upf; } |
| 15 | import onf-site{ prefix st; } |
| 16 | |
| 17 | organization "Open Networking Foundation."; |
| 18 | contact "Scott Baker"; |
| 19 | description |
| 20 | "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 | description "The typedef for vcs-id"; |
| 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 default-behavior { |
| 76 | type at:behavior; |
| 77 | mandatory true; |
| 78 | description |
| 79 | "Default behavior if no filter rules match"; |
| 80 | } |
| 81 | |
| 82 | list filter { |
| 83 | key "application"; |
| 84 | leaf application { |
| 85 | type leafref { |
| 86 | path "/app:application/app:application/app:id"; |
| 87 | } |
| 88 | mandatory true; |
| 89 | description |
| 90 | "Link to application"; |
| 91 | } |
| 92 | leaf priority { |
| 93 | type at:priority; |
| 94 | default 0; |
| 95 | description |
| 96 | "Priority of this application"; |
| 97 | } |
| 98 | leaf allow { |
| 99 | type boolean; |
| 100 | default true; |
| 101 | description |
| 102 | "Allow or deny this application"; |
| 103 | } |
| 104 | description |
| 105 | "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 | } |
| 109 | |
| 110 | leaf upf { |
| 111 | type leafref { |
| 112 | path "/upf:upf/upf:upf/upf:id"; |
| 113 | } |
| 114 | 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"; |
| 130 | } |
| 131 | |
| 132 | leaf site { |
| 133 | type leafref { |
| 134 | path "/st:site/st:site/st:id"; |
| 135 | } |
| 136 | mandatory true; |
| 137 | description |
| 138 | "Link to site where this VCS is deployed"; |
| 139 | } |
| 140 | |
| 141 | // the following are populated from the template |
| 142 | leaf sst { |
| 143 | type at:sst; |
| 144 | mandatory true; |
| 145 | description "Slice/Service type. Immutable."; |
| 146 | } |
| 147 | |
| 148 | leaf sd { |
| 149 | type at:sd; |
| 150 | mandatory true; |
| 151 | description "Slice differentiator. Immutable."; |
| 152 | } |
| 153 | |
| 154 | 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; |
| 161 | description "Per-Slice MBR uplink data rate in bps"; |
| 162 | } |
| 163 | |
| 164 | leaf downlink { |
| 165 | type at:bitrate; |
| 166 | units bps; |
| 167 | description "Per-Slice MBR downlink data rate in bps"; |
| 168 | } |
| 169 | |
| 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 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | // end of items populated from the template |
| 185 | } |
| 186 | } |
| 187 | } |