-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sonic-cfggen][FRR] Support T2 chassis frontend #3100
Conversation
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
src/sonic-config-engine/minigraph.py
Outdated
|
||
# Find physical L3 interfaces that should be enslaved to Vnet | ||
for intf in phyport_intfs: | ||
if isinstance(intf, tuple) == False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isinstance [](start = 11, length = 10)
use this function.
def is_ip_prefix_in_key(self, key):
'''
Function to check if IP address is present in the key. If it
is present, then the key would be a tuple or else, it shall be
be string
'''
return (isinstance(key, tuple))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for better code readability, we need to directly understand the intention of the code without guessing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan Fixed
src/sonic-config-engine/minigraph.py
Outdated
# Get an interface that is enslaved to this port channel | ||
intf_name = None | ||
for pc_member in pc_members: | ||
if isinstance(pc_member, tuple) and pc_member[0] == pc_intf_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to check if pc_member is a tuple or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan I check https://github.com/Azure/SONiC/wiki/Configuration#port-channel-member. It seems that pc_member must be a tuple (port channel, physical interface). So I remove check here.
@@ -13,8 +13,12 @@ def setUp(self): | |||
self.sample_graph_metadata = os.path.join(self.test_dir, 'simple-sample-graph-metadata.xml') | |||
self.sample_graph_pc_test = os.path.join(self.test_dir, 'pc-test-graph.xml') | |||
self.sample_graph_bgp_speaker = os.path.join(self.test_dir, 't0-sample-bgp-speaker.xml') | |||
self.sample_graph_t2_chassis_fe = os.path.join(self.test_dir, 't2-chassis-fe-graph.xml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd suppose it is better to separate the t2 chassis tests into one separate test file since it introduces many new features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stcheng Fixed
for better code readability
retest this please |
1 similar comment
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Old format: version_a_b_c New format: version_<branch>_<nn> sonic-utilities: * 371d62a2 2024-01-13 | Revert "Enhanced route_check.py for multi_asic platforms (sonic-net#3077)" (HEAD -> master, github/ying-test-submodule-advance) [Ying Xie] * 7ddc709a 2024-01-13 | Revert "route_check: Skip route checks if bgp feature is not enabled (sonic-net#3075)" [Ying Xie] * 1489c727 2024-01-12 | [Techsupport]Adding more FRR and BGP dumps (sonic-net#3118) (github/master) [Sudharsan Dhamal Gopalarathnam] * 359e6925 2024-01-11 | Disable Key Validation feature during sonic-installation for Cisco Platforms (sonic-net#3115) [selvipal] * 9515c642 2024-01-04 | [chassis]: Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC (sonic-net#3099) [Arvindsrinivasan Lakshmi Narasimhan] * 9400691c 2023-12-25 | Fix database initialization for db_migrator (sonic-net#3100) [ganglv] * 56dafb07 2023-12-25 | Support disable/enable syslog rate limit feature (sonic-net#3072) [Junchao-Mellanox] * 529bb96b 2023-12-23 | route_check: Skip route checks if bgp feature is not enabled (sonic-net#3075) [anamehra] * bcb10f18 2023-12-23 | Support golden config in db migrator (sonic-net#3076) [ganglv] * 20d1495b 2023-12-21 | [db_migrator] add db migrator version space for 202305/202311 branch (sonic-net#3081) [Ying Xie] * a68d3d3a 2023-12-20 | Collect module EEPROM data in dump (sonic-net#3009) [Junchao-Mellanox] * e7a8def6 2023-12-19 | Enhanced route_check.py for multi_asic platforms (sonic-net#3077) [Deepak Singhal] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
…atically (#17573) #### Why I did it src/sonic-utilities ``` * 942a7c9e - (HEAD -> master, origin/master, origin/HEAD) Revert "Enhanced route_check.py for multi_asic platforms" (#3122) (2 minutes ago) [Ying Xie] * 01ee98ec - Revert "route_check: Skip route checks if bgp feature is not enabled" (#3121) (3 minutes ago) [Ying Xie] * 1489c727 - [Techsupport]Adding more FRR and BGP dumps (#3118) (2 days ago) [Sudharsan Dhamal Gopalarathnam] * 359e6925 - Disable Key Validation feature during sonic-installation for Cisco Platforms (#3115) (4 days ago) [selvipal] * 9515c642 - [chassis]: Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC (#3099) (10 days ago) [Arvindsrinivasan Lakshmi Narasimhan] * 9400691c - Fix database initialization for db_migrator (#3100) (3 weeks ago) [ganglv] * 56dafb07 - Support disable/enable syslog rate limit feature (#3072) (3 weeks ago) [Junchao-Mellanox] * 529bb96b - route_check: Skip route checks if bgp feature is not enabled (#3075) (3 weeks ago) [anamehra] * bcb10f18 - Support golden config in db migrator (#3076) (3 weeks ago) [ganglv] * 20d1495b - [db_migrator] add db migrator version space for 202305/202311 branch (#3081) (4 weeks ago) [Ying Xie] * a68d3d3a - Collect module EEPROM data in dump (#3009) (4 weeks ago) [Junchao-Mellanox] * e7a8def6 - Enhanced route_check.py for multi_asic platforms (#3077) (4 weeks ago) [Deepak Singhal] ``` #### How I did it #### How to verify it #### Description for the changelog
…atically (#17954) #### Why I did it src/sonic-utilities ``` * 9c1d489c - (HEAD -> 202311, origin/202311) Fix database initialization for db_migrator (#3100) (10 hours ago) [ganglv] * e9ae14d2 - Support golden config in db migrator (#3076) (16 hours ago) [ganglv] ``` #### How I did it #### How to verify it #### Description for the changelog
…lly (#18334) #### Why I did it src/sonic-swss ``` * 9e183a65 - (HEAD -> master, origin/master, origin/HEAD) Add bookworm build to the PR checkers (#3114) (2 days ago) [Saikrishna Arcot] * ec463953 - [twamporch] Explicitly initialize local variable (#3115) (2 days ago) [xiaodong hu] * 19410232 - Add force option for fabric port unisolate command (#3089) (7 days ago) [jfeng-arista] * 774973d9 - [dash] fix ENI admin state update (#3081) (8 days ago) [Yakiv Huryk] * 56ba6de3 - [p4orch] Clang format change. (#3096) (10 days ago) [mint570] * f6dd9caa - Introduce a new role for DPU-NPU Interconnect (10 days ago) [Vivek] * 0f707757 - [portsorch] Handle TRANSCEIVER_INFO table on warm boot (#3087) (10 days ago) [Stepan Blyshchak] * cbc263a1 - [EVPN]Fix fpmsyncd crash when EVPN type5 is received with bgp fib suppression enabled (#3101) (13 days ago) [Sudharsan Dhamal Gopalarathnam] * 4af61167 - Fix oper FEC retrieval after warmboot (#3100) (13 days ago) [Sudharsan Dhamal Gopalarathnam] * 2a586154 - [Fdbsyncd] Adding extern_learn flag with fdb entry so Kernel doesn't age out (#2985) (2 weeks ago) [KISHORE KUNAL] * 465399e9 - T2-VOQ-VS: Fix iBGP bringup issue (#3053) (2 weeks ago) [Deepak Singhal] * dc9eae87 - Clang format change. (#3080) (2 weeks ago) [mint570] * 95a74750 - [orchagent] TWAMP Light orchagent implementation (#2927) (2 weeks ago) [xiaodong hu] ``` #### How I did it #### How to verify it #### Description for the changelog
- What I did
Support new role: T2 chassis frontend switch (SpineChassisFrontendRouter). The chassis frontend switch needs BGP-EVPN, Vxlan and Vnet support.
- How I did it
Modify minigraph parser to add Vnet and Vxlan informration for T2 chassis frontend
Add new bgpd and zebra j2 templates to support BGP-EVPN
Add new tests to sonic-cfggen unit test scripts
- How to verify it
Run load_minigraph and verify entries in config DB and FRR configuration.
In config DB, you should be able to see the following entries:
In FRR docker, you should be able to see BGP-EVPN configuration like follows:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Wei Bai baiwei0427@gmail.com and Ze Gan ganze718@gmail.com