summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-isis-policy.yang
blob: 748b7208a2714d93e9189d71e649a46e9d21f294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
module openconfig-isis-policy {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/openconfig-isis-policy";

  prefix "oc-isis-pol";

  // import some basic types
  import openconfig-routing-policy {prefix rpol; }
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-isis-types { prefix isis-types; }


  // meta
  organization
    "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net ";

  description
    "This module contains data definitions for ISIS routing policy.
    It augments the base routing-policy module with BGP-specific
    options for conditions and actions.";

  oc-ext:openconfig-version "0.4.0";

  revision "2018-05-14" {
    description
      "Update LSDB model to correct Extended IS reach TLV
      bug. This change is backwards incompatible due to
      adding an additional level of hierarchy to support
      multiple instances of the TLV.";
    reference "0.4.0";
  }

  revision "2017-07-26" {
    description
      "Update LSDB and fix bugs.";
    reference "0.3.2";
  }

  revision "2017-05-15" {
    description
      "Refactor LSDB.";
    reference "0.3.0";
  }

  revision "2017-01-13" {
    description
      "Remove top-level /isis container";
    reference "0.2.1";
  }

  revision "2016-12-15" {
    description
      "Add segment routing to IS-IS module";
    reference "0.2.0";
  }

  revision "2016-10-18" {
    description
      "Initial revision of IS-IS models.";
    reference "0.1.0";
  }

  // extension statements

  // feature statements

  // identity statements

  // typedef statements

  // grouping statements

   grouping isis-match-conditions {
    description
      "Criteria used to match IS-IS routes within the policy";

    container isis-conditions {
      description
        "Match conditions relating to the IS-IS protocol";

      container config {
        description
          "Configuration parameters relating to IS-IS match
          conditions";

        uses isis-match-conditions-config;
      }

      container state {
        config false;
        description
          "Operational state parameters relating to IS-IS match
          conditions";
        uses isis-match-conditions-config;
      }
    }
  }

  grouping isis-match-conditions-config {
    description
      "Match conditions for IS-IS";

    leaf level-eq {
      type isis-types:level-number;
      description
        "Match the level that the IS-IS prefix is within. This can
        be used in the case that import or export policies refer
        to an IS-IS instance that has multiple levels configured
        within it";
    }
  }

  grouping isis-actions {
    description
      "Actions supplied by the IS-IS protocol to be set on a
      route within the policy";

    container isis-actions {
      description
        "Actions that can be performed by IS-IS within a policy";

      container config {
        description
          "Configuration parameters relating to IS-IS actions";

        uses isis-actions-config;
      }

      container state {
        config false;
        description
          "Operational state associated with IS-IS actions";

        uses isis-actions-config;
      }
    }
  }

  grouping isis-actions-config {
    description
      "Actions for IS-IS";

    leaf set-level {
      type isis-types:level-number;
      description
        "Set the level that a prefix is to be imported into.";
    }

    leaf set-metric-type {
      type isis-types:level-number;
      description
        "Set the type of metric that is to be specified when the
        set metric leaf is specified";
    }

    leaf set-metric {
      type isis-types:wide-metric;
      description
        "Set the metric of the IS-IS prefix";
    }
  }

  // augment statements
 augment "/rpol:routing-policy/rpol:policy-definitions/" +
    "rpol:policy-definition/rpol:statements/rpol:statement/" +
    "rpol:actions" {
    description "This augments igp-actions with ISIS conditions";
    uses isis-actions;

  }

  augment "/rpol:routing-policy/rpol:policy-definitions/" +
    "rpol:policy-definition/rpol:statements/rpol:statement/" +
    "rpol:conditions" {
    description "This augments igp-conditions with ISIS conditions";
    uses isis-match-conditions;
  }

  // rpc statements

  // notification statements
}