-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
sonic-macsec.yang
112 lines (83 loc) · 3.04 KB
/
sonic-macsec.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
module sonic-macsec {
yang-version 1.1;
namespace "http://github.com/sonic-net/sonic-macsec";
prefix macsec;
import sonic-types {
prefix stypes;
}
description "MACsec yang Module for SONiC OS";
revision 2022-04-12 {
description "First Revision";
}
container sonic-macsec {
container MACSEC_PROFILE {
description "MACsec profile of config_db.json";
list MACSEC_PROFILE_LIST {
key "name";
leaf name {
type string {
length 1..128;
}
}
leaf priority {
type uint8;
default 255;
}
leaf cipher_suite {
type string {
pattern "GCM-AES-128|GCM-AES-256|GCM-AES-XPN-128|GCM-AES-XPN-256";
}
default "GCM-AES-128";
}
leaf primary_cak {
type string {
pattern "[0-9a-fA-F]{66}|[0-9a-fA-F]{130}";
}
mandatory true;
}
leaf primary_ckn {
type string {
pattern "[0-9a-fA-F]{32}|[0-9a-fA-F]{64}";
}
mandatory true;
}
leaf fallback_cak {
type string {
pattern "[0-9a-fA-F]{66}|[0-9a-fA-F]{130}";
}
}
leaf fallback_ckn {
type string {
pattern "[0-9a-fA-F]{32}|[0-9a-fA-F]{64}";
}
}
must "string-length(fallback_cak) = 0 or string-length(fallback_cak) = string-length(primary_cak)";
must "string-length(fallback_ckn) = 0 or primary_ckn != fallback_ckn";
leaf policy {
type string {
pattern "integrity_only|security";
}
default "security";
}
leaf enable_replay_protect {
type stypes:boolean_type;
default "false";
}
leaf replay_window {
when "current()/../enable_replay_protect = 'true'";
type uint32;
}
leaf send_sci {
type stypes:boolean_type;
default "true";
}
leaf rekey_period {
description "The period of proactively refresh (Unit second).
If the value is 0, which means never proactive refresh SAK.";
type uint32;
default 0;
}
} /* end of list MACSEC_PROFILE_LIST */
} /* end of container MACSEC_PROFILE */
} /* end of container sonic-macsec */
} /* end of module sonic-macsec */