forked from snabbco/snabb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snabb-nfvconfig-v1.yang
232 lines (194 loc) · 5.09 KB
/
snabb-nfvconfig-v1.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
module snabb-nfvconfig-v1 {
namespace "http://snabb.co/nfvconfig-v1";
prefix snabb-nfvconfig-v1;
import ietf-yang-types { prefix yang; }
import ietf-inet-types { prefix inet; }
organization "Snabb";
contact "[email protected]";
description
"This module describes the configuration of SnabbNFV.";
revision "2016-10-27" {
description
"Initial version that reflects Snabb Switch 2016.11 “Babaco”.";
reference
"https://github.com/snabbco/snabb/releases/tag/v2016.11";
}
typedef pcap-filter {
type string;
description "A pcap-filter(7) expression.";
}
typedef gbps {
type decimal64 {
fraction-digits 4;
range "0..max";
}
description "Gigabits per second.";
}
identity tunnel-type {
description "Base identity from which all tunnel types are derived.";
}
identity L2TPv3 {
base "tunnel-type";
description "Layer 2 Tunneling Protocol Version 3";
}
identity crypto-type {
description
"Base identity from which all transport cryptography types are derived.";
}
identity esp-aes-128-gcm {
base "crypto-type";
description
"Encapsulating Security Payload using AES 128 in Galois Counter Mode";
}
typedef hexstring4 {
type "string" {
pattern "[0-9a-fA-F]{8}";
}
description "Four bytes encoded as a hexadecimal string.";
}
typedef hexstring8 {
type "string" {
pattern "[0-9a-fA-F]{16}";
}
description "Eight bytes encoded as a hexadecimal string.";
}
typedef hexstring16 {
type "string" {
pattern "[0-9a-fA-F]{32}";
}
description "Sixteen bytes encoded as a hexadecimal string.";
}
list port {
key port_id;
description
"An entry containing configuration information applicable to a particular
virtual port.";
leaf port_id {
type string;
mandatory true;
description "The unique identifier of the port.";
}
leaf mac_address {
type yang:mac-address;
mandatory true;
description "MAC address of the port.";
}
leaf vlan {
type uint16 {
range "0..4095";
}
description "Vlan tag.";
}
leaf ingress_filter {
type pcap-filter;
description "Ingress traffic filtering rules.";
}
leaf egress_filter {
type pcap-filter;
description "Egress traffic filtering rules.";
}
container tunnel {
description "L2TPv3 tunnel configuration.";
leaf type {
type identityref {
base "tunnel-type";
}
mandatory true;
description
"Tunnel type identifier.";
}
leaf local_cookie {
type hexstring8;
mandatory true;
description "Local cookie";
}
leaf remote_cookie {
type hexstring8;
mandatory true;
description "Remote cookie";
}
leaf next_hop {
type yang:mac-address;
description "Gateway MAC address.";
}
leaf local_ip {
type inet:ipv6-address-no-zone;
mandatory true;
description "Local IPv6 address.";
}
leaf remote_ip {
type inet:ipv6-address-no-zone;
mandatory true;
description "Remote IPv6 address.";
}
leaf session {
type int32;
description
"The session field of the L2TPv3 header will be overwritten with this
value.";
}
}
leaf rx_police {
type gbps;
description "Allowed input rate in Gigabits per second.";
}
leaf tx_police {
type gbps;
description "Allowed output rate in Gigabits per second.";
}
container crypto {
description "Transport cryptography configuration.";
leaf type {
type identityref {
base "crypto-type";
}
mandatory true;
description
"Cryptography type identifier.";
}
leaf spi {
type uint32 {
range "256..max";
}
mandatory true;
description
"“Security Parameters Index” as specified in RFC 4303.";
}
leaf transmit_key {
type hexstring16;
mandatory true;
description
"128-bit AES key as specified in RFC 4106 used for the encryption of
outgoing packets.";
}
leaf transmit_salt {
type hexstring4;
mandatory true;
description
"Salt as specified in RFC 4106 used for the encryption of outgoing
packets.";
}
leaf receive_key {
type hexstring16;
mandatory true;
description
"128-bit AES key as specified in RFC 4106 used for the decryption of
incoming packets.";
}
leaf receive_salt {
type hexstring4;
mandatory true;
description
"Salt as specified in RFC 4106 used for the decryption of incoming
packets.";
}
leaf auditing {
type boolean;
default false;
description
"Indicates whether to enable or disable “Auditing” as specified in
RFC 4303. The default is no auditing.";
}
}
}
}