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