File tree 4 files changed +62
-6
lines changed
4 files changed +62
-6
lines changed Original file line number Diff line number Diff line change 996
996
"Ethernet12.10|10.0.1.56/31" : {},
997
997
"Ethernet12.10|fc00::1:71/126" : {},
998
998
"Po0003.10" : {
999
- "admin_status" : " up"
999
+ "admin_status" : " up" ,
1000
+ "vlan" : " 10"
1000
1001
},
1001
1002
"Po0003.10|10.0.1.58/31" : {},
1002
1003
"Po0003.10|fc00::1:75/126" : {},
1003
1004
"Eth120.10" : {
1004
- "admin_status" : " up"
1005
+ "admin_status" : " up" ,
1006
+ "vlan" : " 10"
1005
1007
},
1006
1008
"Eth120.10|10.0.1.60/31" : {},
1007
1009
"Eth120.10|fc00::1:79/126" : {}
Original file line number Diff line number Diff line change 55
55
"desc" : " INCORRECT LOOPBACK ACTION IN VLAN_SUB_INTERFACE TABLE." ,
56
56
"eStrKey" : " Pattern" ,
57
57
"eStr" : [" drop|forward" ]
58
+ },
59
+ "VLAN_SUB_INTERFACE_SHORT_NAME_FORMAT_VLAN_CHECK_MUST_CONDITION_FALSE_TEST" : {
60
+ "desc" : " Configure valid short name format vlan sub interface vlan must check condition false." ,
61
+ "eStrKey" : " Must"
58
62
}
59
63
}
Original file line number Diff line number Diff line change 36
36
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE" : {
37
37
"VLAN_SUB_INTERFACE_LIST" : [
38
38
{
39
- "name" : " Eth8.10"
39
+ "name" : " Eth8.10" ,
40
+ "vlan" : 10
40
41
}
41
42
],
42
43
"VLAN_SUB_INTERFACE_IPPREFIX_LIST" : [
132
133
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE" : {
133
134
"VLAN_SUB_INTERFACE_LIST" : [
134
135
{
135
- "name" : " Eth8.10"
136
+ "name" : " Eth8.10" ,
137
+ "vlan" : 10
136
138
}
137
139
],
138
140
"VLAN_SUB_INTERFACE_IPPREFIX_LIST" : [
164
166
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE" : {
165
167
"VLAN_SUB_INTERFACE_LIST" : [
166
168
{
167
- "name" : " Po0001.10"
169
+ "name" : " Po0001.10" ,
170
+ "vlan" : 10
168
171
}
169
172
],
170
173
"VLAN_SUB_INTERFACE_IPPREFIX_LIST" : [
305
308
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE" : {
306
309
"VLAN_SUB_INTERFACE_LIST" : [
307
310
{
308
- "name" : " Po0002.10"
311
+ "name" : " Po0002.10" ,
312
+ "vlan" : 10
309
313
}
310
314
],
311
315
"VLAN_SUB_INTERFACE_IPPREFIX_LIST" : [
533
537
]
534
538
}
535
539
}
540
+ },
541
+ "VLAN_SUB_INTERFACE_SHORT_NAME_FORMAT_VLAN_CHECK_MUST_CONDITION_FALSE_TEST" : {
542
+ "sonic-vlan-sub-interface:sonic-vlan-sub-interface" : {
543
+ "sonic-vlan-sub-interface:VLAN_SUB_INTERFACE" : {
544
+ "VLAN_SUB_INTERFACE_LIST" : [
545
+ {
546
+ "name" : " Eth8.10"
547
+ }
548
+ ],
549
+ "VLAN_SUB_INTERFACE_IPPREFIX_LIST" : [
550
+ {
551
+ "name" : " Eth8.10" ,
552
+ "ip-prefix" : " 10.0.0.1/30"
553
+ }
554
+ ]
555
+ }
556
+ },
557
+ "sonic-port:sonic-port" : {
558
+ "sonic-port:PORT" : {
559
+ "PORT_LIST" : [
560
+ {
561
+ "name" : " Ethernet8" ,
562
+ "admin_status" : " up" ,
563
+ "alias" : " Ethernet8/1" ,
564
+ "description" : " Ethernet8" ,
565
+ "lanes" : " 45,46,47,48" ,
566
+ "mtu" : 9000 ,
567
+ "speed" : 100000
568
+ }
569
+ ]
570
+ }
571
+ }
536
572
}
537
573
}
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ module sonic-vlan-sub-interface {
37
37
38
38
description "VLAN_SUB_INTERFACE part of config_db.json with vrf" ;
39
39
40
+ // encap vlan is mandatory for short name subinterfaces
41
+ must "(substring-before(name, '.') = /port:sonic-port/port:PORT/port:PORT_LIST/port:name) or " +
42
+ "(substring-before(name, '.') = /lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name) or " +
43
+ "vlan"
44
+ {
45
+ error-message "Must condition not satisfied, no encap vlan provided for short-name format vlan sub interface" ;
46
+ }
47
+
40
48
key "name" ;
41
49
42
50
leaf name {
@@ -70,6 +78,12 @@ module sonic-vlan-sub-interface {
70
78
description "Packet action when a packet ingress and gets routed on the same IP interface" ;
71
79
type stypes:loopback_action;
72
80
}
81
+
82
+ leaf vlan {
83
+ type uint16 {
84
+ range 1 ..4094 ;
85
+ }
86
+ }
73
87
}
74
88
75
89
list VLAN_SUB_INTERFACE_IPPREFIX_LIST {
You can’t perform that action at this time.
0 commit comments