Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-isis-policy { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/openconfig-isis-policy"; |
| 7 | |
| 8 | prefix "oc-isis-pol"; |
| 9 | |
| 10 | // import some basic types |
| 11 | import openconfig-routing-policy {prefix rpol; } |
| 12 | import openconfig-extensions { prefix oc-ext; } |
| 13 | import openconfig-isis-types { prefix isis-types; } |
| 14 | |
| 15 | |
| 16 | // meta |
| 17 | organization |
| 18 | "OpenConfig working group"; |
| 19 | |
| 20 | contact |
| 21 | "OpenConfig working group |
| 22 | www.openconfig.net "; |
| 23 | |
| 24 | description |
| 25 | "This module contains data definitions for ISIS routing policy. |
| 26 | It augments the base routing-policy module with BGP-specific |
| 27 | options for conditions and actions."; |
| 28 | |
| 29 | oc-ext:openconfig-version "0.3.2"; |
| 30 | |
| 31 | revision "2017-07-26" { |
| 32 | description |
| 33 | "Update LSDB and fix bugs."; |
| 34 | reference "0.3.2"; |
| 35 | } |
| 36 | |
| 37 | revision "2017-05-15" { |
| 38 | description |
| 39 | "Refactor LSDB."; |
| 40 | reference "0.3.0"; |
| 41 | } |
| 42 | |
| 43 | revision "2017-01-13" { |
| 44 | description |
| 45 | "Remove top-level /isis container"; |
| 46 | reference "0.2.1"; |
| 47 | } |
| 48 | |
| 49 | revision "2016-12-15" { |
| 50 | description |
| 51 | "Add segment routing to IS-IS module"; |
| 52 | reference "0.2.0"; |
| 53 | } |
| 54 | |
| 55 | revision "2016-10-18" { |
| 56 | description |
| 57 | "Initial revision of IS-IS models."; |
| 58 | reference "0.1.0"; |
| 59 | } |
| 60 | |
| 61 | // extension statements |
| 62 | |
| 63 | // feature statements |
| 64 | |
| 65 | // identity statements |
| 66 | |
| 67 | // typedef statements |
| 68 | |
| 69 | // grouping statements |
| 70 | |
| 71 | grouping isis-match-conditions { |
| 72 | description |
| 73 | "Criteria used to match IS-IS routes within the policy"; |
| 74 | |
| 75 | container isis-conditions { |
| 76 | description |
| 77 | "Match conditions relating to the IS-IS protocol"; |
| 78 | |
| 79 | container config { |
| 80 | description |
| 81 | "Configuration parameters relating to IS-IS match |
| 82 | conditions"; |
| 83 | |
| 84 | uses isis-match-conditions-config; |
| 85 | } |
| 86 | |
| 87 | container state { |
| 88 | config false; |
| 89 | description |
| 90 | "Operational state parameters relating to IS-IS match |
| 91 | conditions"; |
| 92 | uses isis-match-conditions-config; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | grouping isis-match-conditions-config { |
| 98 | description |
| 99 | "Match conditions for IS-IS"; |
| 100 | |
| 101 | leaf level-eq { |
| 102 | type isis-types:level-number; |
| 103 | description |
| 104 | "Match the level that the IS-IS prefix is within. This can |
| 105 | be used in the case that import or export policies refer |
| 106 | to an IS-IS instance that has multiple levels configured |
| 107 | within it"; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | grouping isis-actions { |
| 112 | description |
| 113 | "Actions supplied by the IS-IS protocol to be set on a |
| 114 | route within the policy"; |
| 115 | |
| 116 | container isis-actions { |
| 117 | description |
| 118 | "Actions that can be performed by IS-IS within a policy"; |
| 119 | |
| 120 | container config { |
| 121 | description |
| 122 | "Configuration parameters relating to IS-IS actions"; |
| 123 | |
| 124 | uses isis-actions-config; |
| 125 | } |
| 126 | |
| 127 | container state { |
| 128 | config false; |
| 129 | description |
| 130 | "Operational state associated with IS-IS actions"; |
| 131 | |
| 132 | uses isis-actions-config; |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | grouping isis-actions-config { |
| 138 | description |
| 139 | "Actions for IS-IS"; |
| 140 | |
| 141 | leaf set-level { |
| 142 | type isis-types:level-number; |
| 143 | description |
| 144 | "Set the level that a prefix is to be imported into."; |
| 145 | } |
| 146 | |
| 147 | leaf set-metric-type { |
| 148 | type isis-types:level-number; |
| 149 | description |
| 150 | "Set the type of metric that is to be specified when the |
| 151 | set metric leaf is specified"; |
| 152 | } |
| 153 | |
| 154 | leaf set-metric { |
| 155 | type isis-types:wide-metric; |
| 156 | description |
| 157 | "Set the metric of the IS-IS prefix"; |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | // augment statements |
| 162 | augment "/rpol:routing-policy/rpol:policy-definitions/" + |
| 163 | "rpol:policy-definition/rpol:statements/rpol:statement/" + |
| 164 | "rpol:actions" { |
| 165 | description "This augments igp-actions with ISIS conditions"; |
| 166 | uses isis-actions; |
| 167 | |
| 168 | } |
| 169 | |
| 170 | augment "/rpol:routing-policy/rpol:policy-definitions/" + |
| 171 | "rpol:policy-definition/rpol:statements/rpol:statement/" + |
| 172 | "rpol:conditions" { |
| 173 | description "This augments igp-conditions with ISIS conditions"; |
| 174 | uses isis-match-conditions; |
| 175 | } |
| 176 | |
| 177 | // rpc statements |
| 178 | |
| 179 | // notification statements |
| 180 | } |