forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsonic-smart-switch.yang
142 lines (110 loc) · 2.58 KB
/
sonic-smart-switch.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
module sonic-smart-switch {
yang-version 1.1;
namespace "http://github.com/sonic-net/sonic-smart-switch";
prefix smart-switch;
import ietf-inet-types {
prefix inet;
}
import sonic-types {
prefix stypes;
}
import sonic-port {
prefix port;
}
organization
"SONiC";
contact
"SONiC";
description "Smart Switch yang Module for SONiC OS";
revision 2023-10-17 {
description "First Revision";
}
revision 2025-01-11 {
description "Add new container DPU_PORT";
}
container sonic-smart-switch {
container MID_PLANE_BRIDGE {
description "MID_PLANE_BRIDGE part of config_db.json";
container GLOBAL {
leaf bridge {
type string {
pattern "bridge-midplane";
}
description "Name of the midplane bridge";
must "(current()/../ip_prefix)";
}
leaf ip_prefix {
type stypes:sonic-ip4-prefix;
description "IP prefix of the midplane bridge";
}
}
/* end of container GLOBAL */
}
/* end of container MID_PLANE_BRIDGE */
container DPUS {
description "DPUS part of config_db.json";
list DPUS_LIST {
key "dpu_name";
leaf dpu_name {
description "Name of the DPU";
type string {
pattern "dpu[0-9]+";
}
}
leaf midplane_interface {
description "Name of the interface that represents DPU";
type string {
pattern "dpu[0-9]+";
}
must "(current() = current()/../dpu_name)";
}
}
/* end of container DPUS_LIST */
}
/* end of container DPUS */
container DPU_PORT {
description "DPU_PORTs part of config_db.json";
list DPU_PORT_LIST {
description "Name of the DPU port";
key "PORT_NAME";
leaf PORT_NAME {
description "Name of the DPU port";
type string {
pattern "[a-zA-Z]+[0-9]+";
}
}
leaf state {
description "Admin state of DPU device";
type stypes:admin_status;
}
leaf vip_ipv4 {
description "VIP IPv4 address from minigraph";
type inet:ipv4-address;
}
leaf vip_ipv6 {
description "VIP IPv6 address from minigraph";
type inet:ipv6-address;
}
leaf pa_ipv4 {
description "PA IPv4 address from minigraph";
type inet:ipv4-address;
}
leaf pa_ipv6 {
description "PA IPv6 address from minigraph";
type inet:ipv6-address;
}
leaf vdpu_id {
description "ID of VDPUs from minigraph";
type string;
}
leaf gnmi_port {
description "Port gNMI runs on.";
type inet:port-number;
}
}
}
/* end of container DPU_PORT */
}
/* end of container sonic-smart-switch */
}
/* end of module sonic-smart-switch */