forked from ict-strauss/COP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservice-call.yang
458 lines (428 loc) · 11.2 KB
/
service-call.yang
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
module service-call {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:service-call";
prefix s-call;
organization "CTTC";
description "YANG version of the Common Orchestration Protocol (COP).";
revision "2016-12-02" {
description
"Service call module for 5G-Crosshaul";
}
typedef qos_class_enumeration {
type enumeration {
enum gold {
value 1;
description "Gold QoS Class";
}
enum silver {
value 2;
description "Silver QoS Class";
}
}
}
typedef transport_layer_type_enumeration {
type enumeration {
enum dwdm_link {
value 1;
description "Setup a dwdm link";
}
enum ethernet {
value 2;
description "Setup an end to end ethernet path";
}
enum ethernet_broadcast {
value 3;
description "Setup an ethernet Flood";
}
enum mpls {
value 4;
description "Setup an MPLS path";
}
}
}
typedef direction_type_enumeration{
type enumeration{
enum unidir{
value 1;
description "Unidirectional service";
}
enum bidir{
value 2;
description "Bidirectional service";
}
}
}
typedef action_type_enumeration{
type enumeration{
enum forward{
value 1;
description "Forwarding action";
}
enum push_tag{
value 2;
description "PUSH LABEL TAG";
}
enum pop_tag{
value 3;
description "POP LABEL TAG";
}
}
default forward;
}
typedef protocol-type{
type enumeration{
enum TCP;
enum UDP;
enum ARP;
enum DHCP;
}
}
typedef address-type{
type enumeration{
enum IPv4 {
value 0;
}
enum IPv6 {
value 1;
}
enum DatapathID {
value 2;
}
enum MAC {
value 3;
}
}
}
grouping transport_layer-type{
description "";
leaf layer {
type transport_layer_type_enumeration;
}
leaf layer_id {
type string;
}
leaf direction{
type direction_type_enumeration;
}
leaf action{
type action_type_enumeration;
}
}
grouping label{
description "";
leaf label-type{
type enumeration{
enum GMPLS_FIXED {
value 0;
}
enum GMPLS_FLEXI {
value 1;
}
}
}
leaf label-value{
type int32;
}
}
grouping path-type{
description "The Path represents the individual routes of a Connection.";
leaf id{
type string;
}
list topo_components{
key "endpoint_id";
uses endpoint;
}
leaf no_path{
type boolean;
}
leaf multi_layer{
type boolean;
}
container label{
uses label;
}
}
grouping match-rules{
description "Match rules for call - OF match rules + extentions";
leaf in_port{
//type inet:port-number; // Switch input port.
type string;
}
leaf in_phy_port{
//type inet:port-number; // Switch physical input port.
type string;
}
leaf metadata{
type string; // Metadata passed between tables.
}
leaf eth_src{
//type yang:mac-address; // Ethernet source address.
type string;
}
leaf eth_dst{
//type yang:mac-address; // Ethernet destination address.
type string;
}
leaf eth_type{
type int32; // Ethernet frame type.
}
leaf vlan_vid{
type int32; // VLAN id.
}
leaf vlan_pcp{
type int32; // VLAN priority.
}
leaf ip_dscp{
type int32; // IP DSCP (6 bits in ToS field).
}
leaf ip_ecn{
type int32; // IP ECN (2 bits in ToS field).
}
leaf ip_proto{
type int32; // IP protocol.
}
leaf ipv4_src{
//type inet:ip-address; // IPv4 source address.
type string;
}
leaf ipv4_dst{
//type inet:ip-address; // IPv4 destination address.
type string;
}
leaf tcp_src{
type int32; // TCP source port.
}
leaf tcp_dst{
type int32; // TCP destination port.
}
leaf udp_src{
type int32; // UDP source port.
}
leaf udp_dst{
type int32; // UDP destination port.
}
leaf sctp_src{
type int32; // SCTP source port.
}
leaf sctp_dst{
type int32; // SCTP destination port.
}
leaf icmpv4_type{
type int32; // ICMP type.
}
leaf icmpv4_code{
type int32; // ICMP code.
}
leaf arp_op{
type int32; // ARP opcode.
}
leaf arp_spa{
type int32; // ARP source IPv4 address.
}
leaf arp_tpa{
type int32; // ARP target IPv4 address.
}
leaf arp_sha{
type int32; // ARP source hardware address.
}
leaf arp_tha{
type int32; // ARP target hardware address.
}
leaf ipv6_src{
//type inet:ipv6-address; // IPv6 source address.
type string;
}
leaf ipv6_dst{
//type inet:ipv6-address; // IPv6 destination address.
type string;
}
leaf ipv6_flabel{
//type inet:ipv6-flow-label; // IPv6 Flow Label
type string;
}
leaf icmpv6_type{
type int32; // ICMPv6 type.
}
leaf icmpv6_code{
type int32; // ICMPv6 code.
}
leaf ipv6_nd_target{
type int32; // Target address for ND.
}
leaf ipv6_nd_sll{
type int32; // Source link-layer for ND.
}
leaf ipv6_nd_tll{
type int32; // Target link-layer for
}
leaf mpls_label{
type int32; // MPLS label. */
}
leaf mpls_tc{
type int32; // MPLS TC. */
}
leaf mpls_bos{
type int32; // MPLS BoS bit. */
}
leaf pbb_isid{
type int32; // PBB I-SID. */
}
leaf tunnel_id{
type int32; // Logical Port Metadata. */
}
leaf ipv6_exthdr{
type int32; // IPv6 Extension Header pseudo-field */
}
leaf experimental_gmpls_wson_label{
type int32; // GMPLS-TE Label
}
leaf experimental_teid{
type int64;// EXPERIMENTAL MATCH
}
container include_path{
uses path-type;
}
}
grouping endpoint {
description "The End-Point represents the access to the forwarding (as Connection-End-Point) and/or adjacency (as Link-End-Point) function";
leaf endpoint_id{
type string;
description "Name of the endpoint, for example host1-port1";
}
leaf router_id{
type string;
}
leaf edge_end_id{
type string;
}
}
grouping traffic_params{
description "Basic Traffic Parameters to be offered within a Call";
leaf reserved_bandwidth {
description "Reserved Bandwidth measured in Mb/s i.e. 10, 100, 1000 Mb/s";
type int32;
}
leaf latency {
description "Connection latency measured in ms";
type int32;
}
leaf estimated_PLR {
description "Estimated packet loss ratio in %";
type decimal64{
fraction-digits 2;
}
}
leaf OSNR {
description "Optical Signal-to-noise ratio";
type decimal64{
fraction-digits 2;
}
}
leaf qos_class {
type qos_class_enumeration;
}
}
grouping connection {
description "The Connection represents an enabled potential for forwarding (including all circuit and packet forms) between two or more endpoints";
leaf connection_id{
type string;
}
container aEnd{
uses endpoint;
}
container zEnd{
uses endpoint;
}
container path{
uses path-type;
}
container match {
uses match-rules;
}
container traffic_params {
uses traffic_params;
}
leaf controller_domain_id{
type string;
}
container transport_layer{
uses transport_layer-type;
}
leaf operStatus {
description "Running status";
config false;
type enumeration {
enum down {
value 0;
description "down";
}
enum up {
value 1;
description "up";
}
}
}
}
grouping call {
description "A call represents an “intent-request” for connectivity within a Forwarding-Domain between the endpoints. Call is distinct from the Connection that realizes the Call.";
leaf call_id{
mandatory true;
type string;
}
container aEnd{
mandatory true;
uses endpoint;
}
container zEnd{
mandatory true;
uses endpoint;
}
container transport_layer{
uses transport_layer-type;
}
leaf operStatus {
config false;
description "Running status";
type enumeration {
enum down {
value 0;
description "down";
}
enum up {
value 1;
description "up";
}
}
}
container match{
uses match-rules;
}
container traffic_params {
uses traffic_params;
}
list connections{
config false;
key "connection_id";
uses connection;
}
}
notification update_call{
uses call;
}
notification remove_call{
uses call;
}
container calls{
list call {
key "call_id";
uses call;
}
}
container connections{
list connection {
key "connection_id";
uses connection;
}
}
}