Minigraph ECMP parsing support (cleaner format)#4985
Minigraph ECMP parsing support (cleaner format)#4985abdosi merged 2 commits intosonic-net:masterfrom
Conversation
|
need to add sonic-cfggen tests, please |
1288c68 to
29a69cc
Compare
|
retest mellanox please. |
|
retest mellanox please |
1 similar comment
|
retest mellanox please |
29a69cc to
48a323d
Compare
|
retest mellanox please |
318355b to
cb2c833
Compare
|
retest mellanox please |
1 similar comment
|
retest mellanox please |
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Change "hash_bucket_size" to "bucket_size" per schema
src/sonic-config-engine/minigraph.py
Outdated
efb0339 to
1dab9c7
Compare
|
retests vsimage please |
|
retest vsimage please |
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Suggest moving this logic to line 211, and utilizing the endport and startdevice values already generated on line 194 and 195.
There was a problem hiding this comment.
I believe I had written like this to work around the already in-place lines of code in 190-191
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Lets add a check for IPNextHop type FineGrainedECMPGroupMember
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
I suggest that we rename the variable name, not necessary that it is a vlan
There was a problem hiding this comment.
i can use nhg_int if that is better
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Why don't we use the QName based search/parse in the below section?
There was a problem hiding this comment.
For that one specific section, very oddly, there were errors trying to do so. I will look into it again
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
change variable name since its not necessary that it is a vlan
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
IPv4 and IPv6 could have a different enumeration of banks and as a result a different lcm. I would also suggest moving this calculation of lcm to a helper function.
There was a problem hiding this comment.
ok will do this
1dab9c7 to
13beebc
Compare
|
retest vsimage please |
65c39a4 to
bfb5236
Compare
|
This pull request introduces 1 alert and fixes 10 when merging bfb5236488f4f5049f3c61650dc9a2c9b4874e10 into b595a6e - view on LGTM.com new alerts:
fixed alerts:
|
|
retest mellanox please |
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Why do we need to truncate it here for the IPv4/IPv6 check?
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
nit: readability consideration, I would recommend making dpg_ecmp_content a dictionary instead of an array.
There was a problem hiding this comment.
addressed for dpg_ecmp_content as well as png_ecmp_content
|
retest mellanox please |
806610c to
cf74368
Compare
|
retest mellanox please |
src/sonic-config-engine/minigraph.py
Outdated
There was a problem hiding this comment.
Assumes a single interface for all IPs, though it may be addressed in a future PR: it is better to not to assume single interface associated with all IPs.
abdosi
left a comment
There was a problem hiding this comment.
Please see the comments and update it accordingly.
bf3e563 to
da29af4
Compare
f7678b3 to
d90543b
Compare
3615e69 to
940dd94
Compare
|
retest vsimage please |
|
retest vsimage please |
| output = self.run_script(argument) | ||
| self.assertEqual(output.strip(), "['200.200.200.1', '200.200.200.10', '200.200.200.2', '200.200.200.3', '200.200.200.4', '200.200.200.5'," | ||
| " '200.200.200.6', '200.200.200.7', '200.200.200.8', '200.200.200.9', '200:200:200:200::1', '200:200:200:200::10'," | ||
| " '200:200:200:200::2', '200:200:200:200::3', '200:200:200:200::4', '200:200:200:200::5', '200:200:200:200::6'," |
There was a problem hiding this comment.
In a future PR can we address adding checks for the values being populated in these entries(FG_NHG, link, and bank), having only the keys tested prevents 100% test coverage.
anish-n
left a comment
There was a problem hiding this comment.
looks good to me, I provided a comment on test improvement, I would recommend that for a follow up PR.
- Why I did it
To support FG_ECMP for certain azd scenarios
- How I did it
Modified minigraph parser to parse ECMP fields in the case they are present in minigraph
- How to verify it
Loaded ensuing config_db file on a DUT to verify the fields are parsed and configure device correctly
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)