aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-network-instance-types.yang
blob: 67ab3572f9b3f1e5ff60802ca042737518b2cc16 (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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
module openconfig-network-instance-types {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/network-instance-types";

  prefix "oc-ni-types";

  import openconfig-extensions { prefix "oc-ext"; }

  // meta
  organization "OpenConfig working group";

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

  description
    "Types associated with a network instance";

  oc-ext:openconfig-version "0.8.1";

  revision "2017-08-24" {
    description
      "Minor formatting fixes";
    reference "0.8.1";
  }

  revision "2017-02-28" {
    description
      "Add OSPFv2 to network instance";
    reference "0.8.0";
  }

  revision "2017-01-26" {
    description
      "Add policy forwarding to network instance";
    reference "0.7.0";
  }

  revision "2017-01-13" {
    description
      "Add AFT to the network instance";
    reference "0.6.0";
  }

  revision "2016-12-15" {
    description
      "Add segment routing to network instance";
    reference "0.5.0";
  }

  revision "2016-11-10" {
    description
      "Update model to include IS-IS.";
    reference "0.4.1";
  }

  revision "2016-10-12" {
    description
      "Update table connections";
    reference "0.4.0";
  }

  revision "2016-09-28" {
    description
      "Change L2 instance to submodule; add MAC table";
    reference "0.3.0";
  }

  revision "2016-08-11" {
    description
      "Resolve repeated container names in routing protocols";
    reference "0.2.3";
  }

  revision "2016-07-08" {
    description
      "Updated with refactored routing protocol models";
    reference "0.2.1";
  }

  revision "2016-03-29" {
    description
      "Initial revision";
    reference "0.2.0";
  }

  revision "2015-10-18" {
    description
      "Initial revision";
    reference "0.1.0";
  }

  // identity statements
  identity NETWORK_INSTANCE_TYPE {
  	description
  	 "A base identity which can be extended to indicate different
     types of network instance supported by a device.";
  }

  identity DEFAULT_INSTANCE {
    base NETWORK_INSTANCE_TYPE;
    description
      "A special routing instance which acts as the 'default' or
      'global' routing instance for a network device.";
  }

  identity L3VRF {
    base NETWORK_INSTANCE_TYPE;
    description
      "A private Layer 3 only routing instance which is formed of
      one or more RIBs";
  }

  identity L2VSI {
    base NETWORK_INSTANCE_TYPE;
    description
      "A private Layer 2 only switch instance which is formed of
      one or more L2 forwarding tables";
  }

  identity L2P2P {
    base NETWORK_INSTANCE_TYPE;
    description
      "A private Layer 2 only forwarding instance which acts as
      a point to point connection between two endpoints";
  }

  identity L2L3 {
    base NETWORK_INSTANCE_TYPE;
    description
      "A private Layer 2 and Layer 2 forwarding instance";
  }

  identity ENDPOINT_TYPE {
    description
      "Specification of the type of endpoint that is being associated
      with a network instance";
  }

  identity LOCAL {
    base ENDPOINT_TYPE;
    description
      "A local interface which is being associated with the endpoint";
  }

  identity REMOTE {
    base ENDPOINT_TYPE;
    description
      "A remote interface which is being associated with the
      endpoint";
  }

  identity LABEL_ALLOCATION_MODE {
    description
      "Base identity to be used to express types of label allocation
      strategies to be used within a network instance";
  }

  identity PER_PREFIX {
    base LABEL_ALLOCATION_MODE;
    description
      "A label is to be allocated per prefix entry in the RIB for the
      network instance";
  }

  identity PER_NEXTHOP {
    base LABEL_ALLOCATION_MODE;
    description
      "A label is to be allocated per nexthop entry in the RIB for
      the network instance";
  }

  identity INSTANCE_LABEL {
    base LABEL_ALLOCATION_MODE;
    description
      "A single label is to be used for the instance";
  }

  identity ENCAPSULATION {
    description
      "On the wire encapsulations that can be used when
      differentiating network instances";
  }

  identity MPLS {
    base ENCAPSULATION;
    description
      "Use MPLS labels to distinguish network instances on the wire";
  }

  identity VXLAN {
    base ENCAPSULATION;
    description
      "Use VXLAN (RFC7348) VNIs to distinguish network instances on
      the wire";
  }

  identity SIGNALLING_PROTOCOL {
    description
      "The signalling protocol that should be used to diseminate
      entries within a forwarding instance";
  }

  identity LDP {
    base SIGNALLING_PROTOCOL;
    description
      "Use LDP-based setup for signalling. Where the instance is
      a point-to-point service this refers to RFC4447 ('Martini')
      setup. Where the service is an L2VSI, or L2L3 instance it
      refers to RFC4762 LDP-signalled VPLS instances";
  }

  identity BGP_VPLS {
    base SIGNALLING_PROTOCOL;
    description
      "Use BGP-based signalling and autodiscovery for VPLS instances
      as per RFC4761";
  }

  identity BGP_EVPN {
    base SIGNALLING_PROTOCOL;
    description
      "Use BGP-based Ethernet VPN (RFC7432) based signalling for
      the network instance";
  }

  // rjs note:
  // this should move to openconfig-types when merged
  typedef route-distinguisher {
    type union {
      // type 0: <2-byte administrator>:<4-byte assigned number>
      type string {
        pattern '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|'
                + '[1-9]?[1-9]?[0-9][0-9]|[1-9]):'
                + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|'
                + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$';
      }
      // type 1: <ip-address>:<2-byte assigned number>
      type string {
        pattern
          '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
          +  '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):'
          +  '(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|'
          +  '[1-9]?[1-9]?[0-9][0-9]|[1-9])$';
      }
      // type 2: <4-byte as-number>:<2-byte assigned number>
      type string {
        pattern
          '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|'
          + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):'
          + '(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|'
          + '[1-9]{0,2}[0-9][0-9]|[1-9])$';
      }
    }
    description "A route distinguisher value";
    reference "RFC4364";
  }
}