Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: Apache-2.0 |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 4 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 5 | submodule onf-slice { |
Sean Condon | 11d6f42 | 2022-01-14 13:02:03 +0000 | [diff] [blame] | 6 | belongs-to onf-enterprise { prefix ent; } |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 7 | |
| 8 | import ietf-yang-types{ prefix yg; } |
| 9 | import onf-aether-types{ prefix at; } |
Sean Condon | 11d6f42 | 2022-01-14 13:02:03 +0000 | [diff] [blame] | 10 | |
| 11 | include onf-upf; |
| 12 | include onf-device-group; |
| 13 | include onf-application; |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 14 | include onf-priority-traffic-rule; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 15 | |
| 16 | organization "Open Networking Foundation."; |
| 17 | contact "Scott Baker"; |
| 18 | description |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 19 | "An Aether Slice is |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 20 | used to connect devices with applications"; |
| 21 | |
Sean Condon | 11d6f42 | 2022-01-14 13:02:03 +0000 | [diff] [blame] | 22 | revision "2022-01-14" { |
| 23 | description "Refactored as submodule"; |
| 24 | reference "RFC 6020"; |
| 25 | } |
| 26 | |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 27 | revision "2021-09-10" { |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 28 | description "An Aether Slice"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 29 | reference "RFC 6087"; |
| 30 | } |
| 31 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 32 | typedef slice-id { |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 33 | type yg:yang-identifier { |
| 34 | length 1..32; |
| 35 | } |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 36 | description "The typedef for slice-id"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 37 | } |
| 38 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 39 | grouping slice { |
| 40 | description "The slice grouping"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 41 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 42 | list slice { |
| 43 | key "slice-id"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 44 | description |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 45 | "List of Slices"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 46 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 47 | leaf slice-id { |
| 48 | type slice-id; |
| 49 | description "ID for this slice."; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 50 | } |
| 51 | |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 52 | uses at:desc-display-name; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 53 | |
| 54 | list device-group { |
| 55 | key "device-group"; |
| 56 | leaf device-group { |
| 57 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 58 | path "../../../device-group/device-group-id"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 59 | } |
| 60 | description |
| 61 | "Link to device group"; |
| 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 |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 71 | the Slice if the enable field is set to True"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | leaf default-behavior { |
| 75 | type at:behavior; |
| 76 | mandatory true; |
| 77 | description |
| 78 | "Default behavior if no filter rules match"; |
| 79 | } |
| 80 | |
| 81 | list filter { |
| 82 | key "application"; |
| 83 | leaf application { |
| 84 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 85 | path "../../../../application/application-id"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 86 | } |
| 87 | mandatory true; |
| 88 | description |
| 89 | "Link to application"; |
| 90 | } |
| 91 | leaf priority { |
| 92 | type at:priority; |
| 93 | default 0; |
| 94 | description |
| 95 | "Priority of this application"; |
| 96 | } |
| 97 | leaf allow { |
| 98 | type boolean; |
| 99 | default true; |
| 100 | description |
| 101 | "Allow or deny this application"; |
| 102 | } |
| 103 | description |
| 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 | } |
| 108 | |
| 109 | leaf upf { |
| 110 | type leafref { |
Sean Condon | 11d6f42 | 2022-01-14 13:02:03 +0000 | [diff] [blame] | 111 | path "../../upf/upf-id"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 112 | } |
| 113 | description |
| 114 | "Link to user plane that implements this vcf"; |
| 115 | } |
| 116 | |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 117 | // the following are populated from the template |
| 118 | leaf sst { |
| 119 | type at:sst; |
| 120 | mandatory true; |
| 121 | description "Slice/Service type. Immutable."; |
| 122 | } |
| 123 | |
| 124 | leaf sd { |
| 125 | type at:sd; |
| 126 | mandatory true; |
| 127 | description "Slice differentiator. Immutable."; |
| 128 | } |
| 129 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 130 | container mbr { |
| 131 | description "Per slice Maximum Bit Rate"; |
| 132 | leaf uplink { |
| 133 | type at:bitrate; |
| 134 | units bps; |
| 135 | description "Per-Slice MBR uplink data rate in bps"; |
| 136 | } |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 137 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 138 | leaf downlink { |
| 139 | type at:bitrate; |
| 140 | units bps; |
| 141 | description "Per-Slice MBR downlink data rate in bps"; |
| 142 | } |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 143 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 144 | leaf uplink-burst-size { |
| 145 | type at:burst; |
| 146 | units bytes; |
| 147 | description "Per-Slice Uplink burst size"; |
| 148 | } |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 149 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 150 | leaf downlink-burst-size { |
| 151 | type at:burst; |
| 152 | units bytes; |
| 153 | description "Per-Slice Downlink burst size"; |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 154 | } |
| 155 | } |
| 156 | |
| 157 | // end of items populated from the template |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 158 | uses priority-traffic-rule; |
| 159 | |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 160 | } |
| 161 | } |
| 162 | } |