Skip to content

Commit 4ebcc9b

Browse files
authored
Add information regarding version-specific differences (#33)
1 parent 7b688cb commit 4ebcc9b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ DEVICE_TYPE=LeafRouter
2424
ASIC_TYPE=broadcom
2525
```
2626

27+
3. The `/etc/sonic/sonic_version.yml` file includes the build branch of the current SONiC version. This information is necessary for version-specific configuration.
28+
2729
## Configuration Parameters
2830

2931
### bgp_ports
@@ -208,6 +210,8 @@ Result:
208210
}
209211
```
210212

213+
Depending on the SONiC version, the resulting field names in may slightly differ.
214+
211215
### looback_address
212216

213217
Example:
@@ -474,6 +478,8 @@ For each port that is not explicitly configured in `breakouts` and `ports` an en
474478

475479
### sag
476480

481+
SAG configuration is only supported for SONiC versions from the `ec202211_ecsonic` build branch.
482+
477483
Example:
478484

479485
```yaml
@@ -582,13 +588,13 @@ vlans:
582588
- 10.9.8.7
583589
- 10.9.8.6
584590
ip: 10.9.7.0
585-
sag: true
591+
sag: true # only for ec202211_ecsonic branch
586592
tagged_ports:
587593
- PortChannel01
588594
untagged_ports:
589595
- PortChannel11
590596
vrf: Vrf45
591-
vrrp:
597+
vrrp: # only for ec202111 branch
592598
group: 1
593599
priority: 66
594600
ip: 10.255.1.1/24
@@ -620,10 +626,10 @@ Result:
620626
}
621627
},
622628
"VRRP_INTERFACE": {
623-
"Vrrp1-v4": {
624-
"parent_interface": "Vlan4000"
625-
},
626-
"Vrrp1-v4|10.255.1.1/24": {}
629+
"Vrrp1-v4": {
630+
"parent_interface": "Vlan4000"
631+
},
632+
"Vrrp1-v4|10.255.1.1/24": {}
627633
}
628634
}
629635
```

configdb/configdb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func getPortsAndBreakouts(ports values.Ports, breakouts map[string]string, platf
506506

507507
func getSAG(sag *values.SAG, version *v.Version) (*SAG, error) {
508508
if version.Branch != string(v.Branch202211) && sag != nil {
509-
return nil, fmt.Errorf("sag configuration only works with sonic versions from the ec202211 branch")
509+
return nil, fmt.Errorf("sag configuration only works with sonic versions from the ec202211_ecsonic branch")
510510
}
511511

512512
if sag == nil || sag.MAC == "" {
@@ -540,7 +540,7 @@ func getVLANInterfaces(vlans []values.VLAN, version *v.Version) (map[string]VLAN
540540
var vlanInterface VLANInterface
541541

542542
if version.Branch != string(v.Branch202211) && vlan.SAG != nil {
543-
return nil, fmt.Errorf("sag only works for sonic builds from branch 202211")
543+
return nil, fmt.Errorf("sag only works for sonic builds from branch ec202211_ecsonic")
544544
}
545545
var sag string
546546
if vlan.SAG != nil {

0 commit comments

Comments
 (0)