aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-types@2018-05-24.yang
blob: 3775f36b8a2f102b5a6af46defbfa49e76f7772a (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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
module ietf-eth-tran-types {
  namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-types";
  prefix "etht-types";

  organization
    "Internet Engineering Task Force (IETF) CCAMP WG";
  contact
    "
      WG List: <mailto:ccamp@ietf.org>
      ID-draft editor:
        Haomian Zheng (zhenghaomian@huawei.com);
        Italo Busi (italo.busi@huawei.com);
        Aihua Guo (aihuaguo@huawei.com);
        Yunbin Xu (xuyunbin@ritt.cn);
        Yang Zhao (zhaoyangyjy@chinamobile.com);
        Xufeng Liu (Xufeng_Liu@jabil.com);
        Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it);
    ";

  description
    "This module defines the ETH transport types.";

  revision 2018-05-24 {
    description
      "Initial revision";
    reference
      "draft-zheng-ccamp-client-signal-yang";
  }

  /*
   * Identities
   */

  identity eth-vlan-tag-type {
    description
      "ETH VLAN tag type.";
  }

  identity c-vlan-tag-type {
    base eth-vlan-tag-type;
    description
      "802.1Q Customer VLAN";
  }

  identity s-vlan-tag-type {
    base eth-vlan-tag-type;
    description
      "802.1Q Service VLAN (QinQ)";
  }

  identity service-classification-type {
    description
      "Service classification.";
  }

  identity port-classification {
    base service-classification-type;
    description
      "Port classification.";
  }

  identity vlan-classification {
    base service-classification-type;
    description
      "VLAN classification.";
  }

  identity eth-vlan-tag-classify {
    description
      "VLAN tag classification.";
  }

  identity classify-c-vlan {
    base eth-vlan-tag-classify;
    description
      "Classify 802.1Q Customer VLAN tag.
       Only C-tag type is accepted";
  }

  identity classify-s-vlan {
    base eth-vlan-tag-classify;
    description
      "Classify 802.1Q Service VLAN (QinQ) tag.
       Only S-tag type is accepted";
  }

  identity classify-s-or-c-vlan {
    base eth-vlan-tag-classify;
    description
      "Classify S-VLAN or C-VLAN tag-classify.
       Either tag is accepted";
  }

  identity bandwidth-profile-type {
    description
      "Bandwidth Profile Types";
  }

  identity mef-10-bwp {
    base bandwidth-profile-type;
    description
      "MEF 10 Bandwidth Profile";
  }
  identity rfc-2697-bwp {
    base bandwidth-profile-type;
    description
      "RFC 2697 Bandwidth Profile";
  }

  identity rfc-2698-bwp {
    base bandwidth-profile-type;
    description
      "RFC 2698 Bandwidth Profile";
  }

  identity rfc-4115-bwp {
    base bandwidth-profile-type;
    description
      "RFC 4115 Bandwidth Profile";
  }

  identity service-type {
    description
      "Type of Ethernet service.";
  }

  identity p2p-svc {
    base service-type;
    description
      "Ethernet point-to-point service (EPL, EVPL).";
  }

  identity rmp-svc {
    base service-type;
    description
      "Ethernet rooted-multitpoint service (E-TREE, EP-TREE).";
  }

  identity mp2mp-svc {
    base service-type;
    description
      "Ethernet multipoint-to-multitpoint service (E-LAN, EP-LAN).";
  }

  /*
   * Type Definitions
   */

  typedef eth-tag-type {
    type identityref {
      base eth-vlan-tag-type;
    }
    description
      "Identifies a specific ETH VLAN tag type.";
  }

  typedef eth-tag-classify {
    type identityref {
      base eth-vlan-tag-classify;
    }
    description
      "Identifies a specific VLAN tag classification.";
  }

  typedef vlanid {
    type uint16 {
      range "1..4094";
    }
    description
      "The 12-bit VLAN-ID used in the VLAN Tag header.";
  }

  typedef vid-range-type {
    type string {
      pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" +
              "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
    }
    description
      "A list of VLAN Ids, or non overlapping VLAN ranges, in
       ascending order, between 1 and 4094.
       This type is used to match an ordered list of VLAN Ids, or
       contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the
       range 1 to 4094, and included in the list in non overlapping
       ascending order.
       For example: 1,10-100,50,500-1000";
  }

  typedef bandwidth-profile-type {
    type identityref {
      base bandwidth-profile-type;
    }
    description
      "Identifies a specific Bandwidth Profile type.";
    }

  typedef service-type {
    type identityref {
      base service-type;
    }
    description
      "Identifies the type of Ethernet service.";
  }

  /*
   * Grouping Definitions
   */

  grouping etht-bandwidth-profiles {
    description
      "Bandwidth profile configuration paramters.";

    leaf bandwidth-profile-name {
      type string;
      description
        "Name of the bandwidth profile.";
    }
    leaf bandwidth-profile-type {
      type etht-types:bandwidth-profile-type;
      description
        "The type of bandwidth profile.";
    }
    leaf CIR {
      type uint64;
      description
        "Committed Information Rate in Kbps";
    }
    leaf CBS {
      type uint64;
      description
        "Committed Burst Size in in KBytes";
    }
    leaf EIR {
      type uint64;
/*
 * Open Issue: need to indicate that EIR is not supported by RFC 2697
 *   must
 *     '../bw-profile-type = "mef-10-bwp" or ' +
 *     '../bw-profile-type = "rfc-2698-bwp" or ' +
 *     '../bw-profile-type = "rfc-4115-bwp"'
 *
 *   must
 *     '../bw-profile-type != "rfc-2697-bwp"'
*/
      description
        "Excess Information Rate in Kbps
         In case of RFC 2698, PIR = CIR + EIR";
    }
    leaf EBS {
      type uint64;
      description
        "Excess Burst Size in KBytes.
         In case of RFC 2698, PBS = CBS + EBS";
    }
    leaf color-aware {
      type boolean;
      description
        "Indicates weather the color-mode is color-aware or color-blind.";
    }
    leaf coupling-flag {
      type boolean;
/*
 * Open issue: need to indicate that Coupling Flag is defined only for MEF 10
 *
 *   must
 *     '../bw-profile-type = "mef-10-bwp"'
 */
      description
        "Coupling Flag.";
    }
  }

  grouping eth-bandwidth {
    leaf eth-bandwidth {
      type uint64 {
        range "0..10000000000";
      }
      units "Kbps";
      description
        "Available bandwith value expressed in kilobits per second";
    }
  }

  grouping eth-label-restriction {
          container eth-label-restriction {
      leaf tag-type {
        type etht-types:eth-tag-type;
        description "VLAN tag type.";
      }
      leaf priority {
              type uint8;
              description "priority.";
            }
    }
  }

  grouping eth-label {
    leaf vlanid {
      type etht-types:vlanid;
        description
          "VLAN tag id.";
      }
    }
}