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; } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 15 | import onf-upf { prefix upf; } |
| 16 | |
| 17 | organization "Open Networking Foundation."; |
| 18 | contact "Scott Baker"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 19 | description |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | } |
| 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 55 | key "device-group"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 56 | leaf device-group { |
| 57 | type leafref { |
| 58 | path "/dg:device-group/dg:device-group/dg:id"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 59 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 60 | description |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 61 | "Link to device group"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 62 | } |
| 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 72 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 73 | |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 74 | leaf default-behavior { |
| 75 | type at:behavior; |
| 76 | mandatory true; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 77 | description |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 78 | "Default behavior if no filter rules match"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 79 | } |
| 80 | |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 81 | list filter { |
| 82 | key "application"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 83 | 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 91 | leaf priority { |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 92 | type at:priority; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 93 | default 0; |
| 94 | description |
| 95 | "Priority of this application"; |
| 96 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 97 | leaf allow { |
| 98 | type boolean; |
| 99 | default true; |
| 100 | description |
| 101 | "Allow or deny this application"; |
| 102 | } |
| 103 | description |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 104 | "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 Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 108 | |
| 109 | leaf upf { |
| 110 | type leafref { |
| 111 | path "/upf:upf/upf:upf/upf:id"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 112 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 113 | 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 129 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 130 | |
| 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 137 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 138 | leaf sd { |
| 139 | type at:sd; |
| 140 | mandatory true; |
| 141 | description "Slice differentiator. Immutable."; |
| 142 | } |
| 143 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 144 | 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 Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 162 | // end of items populated from the template |
| 163 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 164 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 165 | } |