[sonic-cfggen][FRR] Support T2 chassis frontend#3100
[sonic-cfggen][FRR] Support T2 chassis frontend#3100lguohan merged 15 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
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.
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.
for better code readability, we need to directly understand the intention of the code without guessing.
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.
why do we need to check if pc_member is a tuple or not?
There was a problem hiding this comment.
@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.
| 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.
i'd suppose it is better to separate the t2 chassis tests into one separate test file since it introduces many new features
for better code readability
|
retest this please |
1 similar comment
|
retest this please |
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] * 1489c72 2024-01-12 | [Techsupport]Adding more FRR and BGP dumps (sonic-net#3118) (github/master) [Sudharsan Dhamal Gopalarathnam] * 359e692 2024-01-11 | Disable Key Validation feature during sonic-installation for Cisco Platforms (sonic-net#3115) [selvipal] * 9515c64 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] * 9400691 2023-12-25 | Fix database initialization for db_migrator (sonic-net#3100) [ganglv] * 56dafb0 2023-12-25 | Support disable/enable syslog rate limit feature (sonic-net#3072) [Junchao-Mellanox] * 529bb96 2023-12-23 | route_check: Skip route checks if bgp feature is not enabled (sonic-net#3075) [anamehra] * bcb10f1 2023-12-23 | Support golden config in db migrator (sonic-net#3076) [ganglv] * 20d1495 2023-12-21 | [db_migrator] add db migrator version space for 202305/202311 branch (sonic-net#3081) [Ying Xie] * a68d3d3 2023-12-20 | Collect module EEPROM data in dump (sonic-net#3009) [Junchao-Mellanox] * e7a8def 2023-12-19 | Enhanced route_check.py for multi_asic platforms (sonic-net#3077) [Deepak Singhal] Signed-off-by: Ying Xie <[email protected]>
…atically (#17573) #### Why I did it src/sonic-utilities ``` * 942a7c9 - (HEAD -> master, origin/master, origin/HEAD) Revert "Enhanced route_check.py for multi_asic platforms" (#3122) (2 minutes ago) [Ying Xie] * 01ee98e - Revert "route_check: Skip route checks if bgp feature is not enabled" (#3121) (3 minutes ago) [Ying Xie] * 1489c72 - [Techsupport]Adding more FRR and BGP dumps (#3118) (2 days ago) [Sudharsan Dhamal Gopalarathnam] * 359e692 - Disable Key Validation feature during sonic-installation for Cisco Platforms (#3115) (4 days ago) [selvipal] * 9515c64 - [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] * 9400691 - Fix database initialization for db_migrator (#3100) (3 weeks ago) [ganglv] * 56dafb0 - Support disable/enable syslog rate limit feature (#3072) (3 weeks ago) [Junchao-Mellanox] * 529bb96 - route_check: Skip route checks if bgp feature is not enabled (#3075) (3 weeks ago) [anamehra] * bcb10f1 - Support golden config in db migrator (#3076) (3 weeks ago) [ganglv] * 20d1495 - [db_migrator] add db migrator version space for 202305/202311 branch (#3081) (4 weeks ago) [Ying Xie] * a68d3d3 - Collect module EEPROM data in dump (#3009) (4 weeks ago) [Junchao-Mellanox] * e7a8def - 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 ``` * 9e183a6 - (HEAD -> master, origin/master, origin/HEAD) Add bookworm build to the PR checkers (#3114) (2 days ago) [Saikrishna Arcot] * ec46395 - [twamporch] Explicitly initialize local variable (#3115) (2 days ago) [xiaodong hu] * 1941023 - Add force option for fabric port unisolate command (#3089) (7 days ago) [jfeng-arista] * 774973d - [dash] fix ENI admin state update (#3081) (8 days ago) [Yakiv Huryk] * 56ba6de - [p4orch] Clang format change. (#3096) (10 days ago) [mint570] * f6dd9ca - Introduce a new role for DPU-NPU Interconnect (10 days ago) [Vivek] * 0f70775 - [portsorch] Handle TRANSCEIVER_INFO table on warm boot (#3087) (10 days ago) [Stepan Blyshchak] * cbc263a - [EVPN]Fix fpmsyncd crash when EVPN type5 is received with bgp fib suppression enabled (#3101) (13 days ago) [Sudharsan Dhamal Gopalarathnam] * 4af6116 - Fix oper FEC retrieval after warmboot (#3100) (13 days ago) [Sudharsan Dhamal Gopalarathnam] * 2a58615 - [Fdbsyncd] Adding extern_learn flag with fdb entry so Kernel doesn't age out (#2985) (2 weeks ago) [KISHORE KUNAL] * 465399e - T2-VOQ-VS: Fix iBGP bringup issue (#3053) (2 weeks ago) [Deepak Singhal] * dc9eae8 - Clang format change. (#3080) (2 weeks ago) [mint570] * 95a7475 - [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 [email protected] and Ze Gan [email protected]