forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_SonicYang.json
More file actions
293 lines (293 loc) · 10.7 KB
/
Copy pathtest_SonicYang.json
File metadata and controls
293 lines (293 loc) · 10.7 KB
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
{
"data_file" : "./tests/libyang-python-tests/config_data.json",
"data_merge_file" : "./tests/libyang-python-tests/config_data_merge.json",
"data_nodes" : [
{
"valid" : "True",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/alias"
},
{
"valid" : "False",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet20']/alias"
},
{
"valid" : "True",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE"
},
{
"valid" : "False",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST"
},
{
"valid" : "True",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='2000:f500:45:6709::/64']"
}
],
"data_type" : [
{
"data_type" : "LY_TYPE_STRING",
"xpath" : "/test-port:port/test-port:PORT/test-port:PORT_LIST/test-port:port_name"
},
{
"data_type" : "LY_TYPE_LEAFREF",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_INTERFACE/test-vlan:VLAN_INTERFACE_LIST/test-vlan:vlanid"
}
],
"delete_nodes" : [
{
"valid" : "False",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet10']/speed"
},
{
"valid" : "True",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/mtu"
},
{
"valid" : "False",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet20']/mtu"
}
],
"dependencies" : [
{
"dependencies" : [
"/test-acl:acl/ACL_TABLE/ACL_TABLE_LIST[ACL_TABLE_NAME='PACL-V6']/ports[.='Ethernet8']",
"/test-interface:interface/INTERFACE/INTERFACE_LIST[interface='Ethernet8'][ip-prefix='10.1.1.64/26']/interface",
"/test-interface:interface/INTERFACE/INTERFACE_LIST[interface='Ethernet8'][ip-prefix='2000:f500:40:a749::/126']/interface"
],
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet8']/port_name"
},
{
"dependencies" : [],
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet8']/alias"
}
],
"leafref_path" : [
{
"leafref_path" : "../../../VLAN/VLAN_LIST/vlanid",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_INTERFACE/test-vlan:VLAN_INTERFACE_LIST/test-vlan:vlanid"
},
{
"leafref_path" : "/test-port:port/test-port:PORT/test-port:PORT_LIST/test-port:port_name",
"xpath" : "/test-interface:interface/test-interface:INTERFACE/test-interface:INTERFACE_LIST/test-interface:interface"
},
{
"leafref_path" : "/test-port:port/test-port:PORT/test-port:PORT_LIST/test-port:port_name",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_MEMBER/test-vlan:VLAN_MEMBER_LIST/test-vlan:port"
},
{
"leafref_path" : "../../../VLAN/VLAN_LIST/vlanid",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_MEMBER/test-vlan:VLAN_MEMBER_LIST/test-vlan:vlanid"
}
],
"leafref_type" : [
{
"data_type" : "LY_TYPE_UINT16",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='2000:f500:45:6709::/64']/vlanid"
},
{
"data_type" : "LY_TYPE_STRING",
"xpath" : "/test-interface:interface/INTERFACE/INTERFACE_LIST[interface='Ethernet8'][ip-prefix='2000:f500:40:a749::/126']/interface"
},
{
"data_type" : "LY_TYPE_STRING",
"xpath" : "/test-vlan:vlan/VLAN_MEMBER/VLAN_MEMBER_LIST[vlanid='111'][port='Ethernet0']/port"
},
{
"data_type" : "LY_TYPE_UINT16",
"xpath" : "/test-vlan:vlan/VLAN_MEMBER/VLAN_MEMBER_LIST[vlanid='111'][port='Ethernet0']/vlanid"
}
],
"leafref_type_schema" : [
{
"data_type" : "LY_TYPE_UINT16",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_INTERFACE/test-vlan:VLAN_INTERFACE_LIST/test-vlan:vlanid"
},
{
"data_type" : "LY_TYPE_STRING",
"xpath" : "/test-interface:interface/test-interface:INTERFACE/test-interface:INTERFACE_LIST/test-interface:interface"
},
{
"data_type" : "LY_TYPE_STRING",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_MEMBER/test-vlan:VLAN_MEMBER_LIST/test-vlan:port"
},
{
"data_type" : "LY_TYPE_UINT16",
"xpath" : "/test-vlan:vlan/test-vlan:VLAN_MEMBER/test-vlan:VLAN_MEMBER_LIST/test-vlan:vlanid"
}
],
"members" : [
{
"members" : [
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet0']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet1']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet2']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet3']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet4']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet5']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet6']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet7']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet8']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet10']",
"/test-port:port/PORT/PORT_LIST[port_name='Ethernet12']"
],
"xpath" : "/test-port:port/PORT/PORT_LIST"
}
],
"merged_nodes" : [
{
"value" : "25000",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet10']/speed"
},
{
"value" : "IPv6",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='200'][ip-prefix='2000:f500:45:6708::/64']/family"
}
],
"modules" : [
{
"file" : "test-head.yang",
"module" : "test-head"
},
{
"file" : "test-port.yang",
"module" : "test-port"
},
{
"file" : "test-acl.yang",
"module" : "test-acl"
},
{
"file" : "test-interface.yang",
"module" : "test-interface"
},
{
"file" : "test-portchannel.yang",
"module" : "test-portchannel"
},
{
"file" : "test-vlan.yang",
"module" : "test-vlan"
},
{
"file" : "test-yang-structure.yang",
"module" : "test-yang-structure"
}
],
"new_nodes" : [
{
"value" : "Ethernet10_alias",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet12']/alias"
},
{
"value" : "5000",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet12']/speed"
},
{
"value" : "rule_20",
"xpath" : "/test-acl:acl/ACL_RULE/ACL_RULE_LIST[ACL_TABLE_NAME='PACL-test'][RULE_NAME='rule_20']/RULE_NAME"
}
],
"node_values" : [
{
"value" : "25000",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/speed"
},
{
"value" : "IPv6",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='2000:f500:45:6709::/64']/family"
}
],
"parents" : [
{
"parent" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='2000:f500:45:6709::/64']",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='2000:f500:45:6709::/64']/family"
},
{
"parent" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']/scope"
},
{
"parent" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']/vlanid"
},
{
"parent" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']/ip-prefix"
},
{
"parent" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']/family"
},
{
"parent" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/speed"
}
],
"prefix" : [
{
"module_name" : "test-head",
"module_prefix" : "head"
},
{
"module_name" : "test-port",
"module_prefix" : "port"
},
{
"module_name" : "test-acl",
"module_prefix" : "acl"
},
{
"module_name" : "test-interface",
"module_prefix" : "intf"
},
{
"module_name" : "test-portchannel",
"module_prefix" : "lag"
},
{
"module_name" : "test-vlan",
"module_prefix" : "vlan"
},
{
"module_name" : "test-yang-structure",
"module_prefix" : "yangstructtest"
}
],
"schema_dependencies" : [
{
"schema_dependencies" : [
"/test-acl:acl/test-acl:ACL_TABLE/test-acl:ACL_TABLE_LIST/test-acl:ports",
"/test-portchannel:portchannel/test-portchannel:PORTCHANNEL/test-portchannel:PORTCHANNEL_LIST/test-portchannel:members",
"/test-interface:interface/test-interface:INTERFACE/test-interface:INTERFACE_LIST/test-interface:interface",
"/test-vlan:vlan/test-vlan:VLAN_MEMBER/test-vlan:VLAN_MEMBER_LIST/test-vlan:port"
],
"xpath" : "/test-port:port/test-port:PORT/test-port:PORT_LIST/test-port:port_name"
}
],
"schema_nodes" : [
{
"value" : "/test-vlan:vlan/test-vlan:VLAN_INTERFACE/test-vlan:VLAN_INTERFACE_LIST/test-vlan:family",
"xpath" : "/test-vlan:vlan/VLAN_INTERFACE/VLAN_INTERFACE_LIST[vlanid='111'][ip-prefix='10.1.1.64/26']/family"
},
{
"value" : "/test-port:port/test-port:PORT/test-port:PORT_LIST/test-port:speed",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/speed"
}
],
"set_nodes" : [
{
"value" : "10000",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet10']/speed"
},
{
"value" : "1500",
"xpath" : "/test-port:port/PORT/PORT_LIST[port_name='Ethernet9']/mtu"
},
{
"value" : "server_vlan111",
"xpath" : "/test-vlan:vlan/VLAN/VLAN_LIST[vlanid='111']/description"
}
],
"yang_dir" : "./tests/libyang-python-tests/sample-yang-models/"
}