Skip to content

Commit 91c7abd

Browse files
authored
Adapt LLDP config keys to Edgecore 202111 branch (#19)
1 parent fe3f38b commit 91c7abd

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ Result:
174174

175175
### lldp_hello_time
176176

177+
This configuration slightly differs across SONiC versions and might not always have an effect.
178+
As this tool is tailored for Edgecore SONiC versions 202111.x the LLDP configuration for those versions should work.
179+
177180
Example:
178181

179182
```yaml
@@ -185,8 +188,8 @@ Result:
185188
```json
186189
{
187190
"LLDP": {
188-
"GLOBAL": {
189-
"hello_time": "10"
191+
"Global": {
192+
"hello_timer": "10"
190193
}
191194
}
192195
}

configdb/fields.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ const (
8484
)
8585

8686
type LLDP struct {
87-
Global LLDPGlobal `json:"GLOBAL"`
87+
Global LLDPGlobal `json:"Global"`
8888
}
8989

9090
type LLDPGlobal struct {
91-
HelloTime string `json:"hello_time,omitempty"`
91+
HelloTime string `json:"hello_timer,omitempty"`
9292
}
9393

9494
type MCLAGDomain struct {

tests/1/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@
171171
}
172172
},
173173
"LLDP": {
174-
"GLOBAL": {
175-
"hello_time": "10"
174+
"Global": {
175+
"hello_timer": "10"
176176
}
177177
},
178178
"LOOPBACK_INTERFACE": {

tests/2/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@
120120
}
121121
},
122122
"LLDP": {
123-
"GLOBAL": {
124-
"hello_time": "10"
123+
"Global": {
124+
"hello_timer": "10"
125125
}
126126
},
127127
"LOOPBACK_INTERFACE": {

tests/4/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@
178178
"10.0.0.10": {}
179179
},
180180
"LLDP": {
181-
"GLOBAL": {
182-
"hello_time": "10"
181+
"Global": {
182+
"hello_timer": "10"
183183
}
184184
},
185185
"LOOPBACK_INTERFACE": {

0 commit comments

Comments
 (0)