-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrl_nokia-interfaces-ip-dhcp.yang
89 lines (82 loc) · 2.61 KB
/
srl_nokia-interfaces-ip-dhcp.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
module srl_nokia-interfaces-ip-dhcp {
yang-version 1.1;
namespace "urn:srl_nokia/interfaces/ip/dhcp";
prefix srl_nokia-if-ip-dhcp;
import srl_nokia-interfaces {
prefix srl_nokia-if;
}
description
"Model for managing DHCP and DHCPv6 on IP subinterfaces";
revision 2022-03-31 {
description
"SRLinux 22.3.1";
}
revision 2020-06-30 {
description
"SRLinux 20.6.1";
}
revision 2019-11-30 {
description
"SRLinux 19.11.1";
}
grouping subinterface-dhcpv4 {
container dhcp-client {
config true;
presence "The subinterface attempts to obtain its IPv4 address and prefix using DHCP";
description
"Container for options related to DHCP";
// Tried moving to augment 'when' clause - doesn't work
// Modified to allow only mgmt
must "(../../../srl_nokia-if:name = 'mgmt0' and ../../srl_nokia-if:index = 0)" {
error-message "dhcp-client not configurable on this subinterface";
}
container trace-options {
description
"Container for tracing DHCPv4 operations on the subinterface";
leaf-list trace {
type enumeration {
enum messages {
description
"Capture all DHCPv4 messages sent and received by the subinterface";
}
}
description
"List of events to trace";
}
}
}
}
grouping subinterface-dhcpv6 {
container dhcp-client {
presence "The subinterface attempts to obtain its IPv6 address using DHCPv6";
description
"Container for options related to DHCPv6";
must "(../../../srl_nokia-if:name = 'mgmt0' and ../../srl_nokia-if:index = 0)" {
error-message "dhcp-client not configurable on this subinterface";
}
container trace-options {
description
"Container for tracing DHCPv6 operations on the subinterface";
leaf-list trace {
type enumeration {
enum messages {
description
"Capture all DHCPv6 messages sent and received by the subinterface";
}
}
description
"List of events to trace";
}
}
}
}
augment "/srl_nokia-if:interface/srl_nokia-if:subinterface/srl_nokia-if:ipv4" {
// only supported on mgmt0
when "(../../srl_nokia-if:name = 'mgmt0' and ../srl_nokia-if:index = 0)";
uses subinterface-dhcpv4;
}
augment "/srl_nokia-if:interface/srl_nokia-if:subinterface/srl_nokia-if:ipv6" {
when "(../../srl_nokia-if:name = 'mgmt0' and ../srl_nokia-if:index = 0)";
uses subinterface-dhcpv6;
}
}