Combine alias_map.json with port_config.ini#304
Conversation
| def get_alias_map_list(hwsku, platform=None): | ||
| port_config_candidates = [] | ||
| port_config_candidates.append('/usr/share/sonic/sku/port_config.ini') | ||
| if platform != None: |
There was a problem hiding this comment.
platform must not be none #ByDesign
There was a problem hiding this comment.
When called in the container, actually you won't need to know the platform.
In reply to: 101695783 [](ancestors = 101695783)
| port_config_candidates.append('/usr/share/sonic/sku/port_config.ini') | ||
| if platform != None: | ||
| port_config_candidates.append(os.path.join('/usr/share/sonic/device', platform, hwsku, 'port_config.ini')) | ||
| port_config_candidates.append(os.path.join('/usr/share/sonic/device', hwsku, 'port_config.ini')) |
There was a problem hiding this comment.
why do we need these candidate? #ByDesign
There was a problem hiding this comment.
For supporting usage in both base os and docker container, and for backward compatibility
In reply to: 101695827 [](ancestors = 101695827)
src/sonic-config-engine/sonic-cfggen
Outdated
| if machine_info == None: | ||
| data.update(parse_xml(minigraph)) | ||
| else: | ||
| data.update(parse_xml(minigraph, machine_info['onie_platform'])) |
There was a problem hiding this comment.
need to handle aboot (arista) platform
if machine_info.has_key['onie_platform']:
data.update.
elif machine_info.has_key['aboot_platform']:
data.update(parse_xml(minigraph, machine_info['aboot_platform']))
else:
throw error
``` #Resolved
| return addr.version == 6 | ||
|
|
||
| def get_machine_info(): | ||
| if not os.path.isfile('/host/machine.conf'): |
There was a problem hiding this comment.
should fail explicitly when there is no machine.conf since we do not which platform it is now. #WontFix
There was a problem hiding this comment.
I don't really want to limit the usage of this tool to only environment where /host/machine.conf exists, as most of the functionality actually don't depend on that.
In reply to: 101696547 [](ancestors = 101696547)
| if not os.path.isfile(alias_map_json): | ||
| def get_alias_map_list(hwsku, platform=None): | ||
| port_config_candidates = [] | ||
| port_config_candidates.append('/usr/share/sonic/sku/port_config.ini') |
There was a problem hiding this comment.
why do we need to this? #Pending
There was a problem hiding this comment.
lguohan
left a comment
There was a problem hiding this comment.
please check the comments
| Ethernet116 113,114,115,116 | ||
| Ethernet120 5,6,7,8 | ||
| Ethernet124 1,2,3,4 | ||
| # alias lanes alias |
There was a problem hiding this comment.
use another name otherwise we will have two alias which is confusing #Resolved
del is a keyword in Python Signed-off-by: Shu0T1an ChenG <[email protected]>
a4a1e10 - 2019-11-07 : Changes in swss-common submodule to support NAT feature. (#304) [Kiran Kumar Kella] b1375bb - 2019-10-28 : [consumer_table] Add messages for performing object availability query (#314) [Danny Allen] 2fe2327 - 2019-10-25 : adding FDB table in CFG db (#303) [anilkpandey] 2018880 - 2019-09-26 : added COUNTERS_LAG_NAME_MAP_TABLE in COUNTERS_DB [anilkpandey] f41dcc3 - 2019-10-07 : added lua script to flush fdb entries [anilkpandey] c87a7cf - 2019-10-25 : [consumer_table] Add messages for performing attribute enum value capabilities query (#313) [Danny Allen]
a4a1e10 - 2019-11-07 : Changes in swss-common submodule to support NAT feature. (sonic-net#304) [Kiran Kumar Kella] b1375bb - 2019-10-28 : [consumer_table] Add messages for performing object availability query (sonic-net#314) [Danny Allen] 2fe2327 - 2019-10-25 : adding FDB table in CFG db (sonic-net#303) [anilkpandey] 2018880 - 2019-09-26 : added COUNTERS_LAG_NAME_MAP_TABLE in COUNTERS_DB [anilkpandey] f41dcc3 - 2019-10-07 : added lua script to flush fdb entries [anilkpandey] c87a7cf - 2019-10-25 : [consumer_table] Add messages for performing attribute enum value capabilities query (sonic-net#313) [Danny Allen]
* initial barefoot checkin october 2017 * Revert "Merge branch 'master' of https://github.com/Azure/sonic-sairedis into rel_6_0" This reverts commit c48a7a20de2fb9e615535481f8727029440413bc, reversing changes made to aa5bf640db7b7fca245c1669eeb02198a50cb5c1. * missed integration diffs * Added new attr type support to sairedis. Also, some fixes for compilation issues * Changes to add new DTel api support in sairedis * Add new file to generate Dtel specific SAI stub API * Missed adding a file in the last commit * Fix ref point for SAI * Updated SAI repo to point to dtel_exp * Changes to handle new additions to DTel experimental SAI. Not compiled yet * handle platform specific lins in different directory (@runtime) * force order of library path to look for platform dir before lib dir * Change SAI branch refpoint * Update SAI submodule refpoint * enable fast-boot for barefoot platforms * Update ref point for SAI * SONiC changes due to DTel experimental SAI changes * allow Makefile to build for other platforms - restore it original for non-bfn platforms * allow clean build * Revert "allow clean build" This reverts commit adfdb8642fe0b5dbb4e19d13871172a03a8c883b. * Revert "allow Makefile to build for other platforms - restore it original for non-bfn platforms" This reverts commit d6b0ca34fcf63d0b79c801cd95d7ee2fe58d21ac. * makefile cleanup towards upstream * Support for platforms based on Barefoot Networks' device (sonic-net#304) * search for exact string - newer onie versions match multiple lines * Will need to revert this Should work without this change. Untested for now * SONiC sairedis changes needed to work with SAIv1.3 * Fix SAI path in gitmodules and add a comment * Remove sai thrift build hack * enable fast-boot for barefoot platforms * enable fast-boot for barefoot platforms * Add missing sai rpc hdr file path for bfn * Update SAI ref points * Multi p4 profile support for bfn sde (#5) * Remove code duplicated in merge * Keep fn in same order as azure master (#8) * Address review comment * Link just bfn sai lib and shorten linking command by removing other libraries linked at compile time (#6) * Link only bfn sai lib * all unresolved symbols resolved at runtime * Preload some bfn libraries on syncd startup * Build fix * also remove commented code * Convert tabs to spaces * Fix alignment * Address upstream comment * BFN: link with just sai library for saisdkdump * Address review comments
…unters SONiC CPU Packet Debug Counters updates
7c48be2 Add warning/critical thresholds for PSU power (sonic-net#304) f5ba0d0 Add missing PM and VDM related EEPROM read (sonic-net#326) 02dd597 implement CMIS set_laser_freq to support 100GHz grid space (sonic-net#294) Signed-off-by: Stephen Sun <[email protected]>
#12791) * Update submodule sonic-utilities 72b9cf9 [psushow & psuutil] Support PSU power threshold checking (#2326) dfdc92e Revert "Support the bandit check by GitHub Action (#2358)" (#2509) 85638b2 YANG Validation for ConfigDB Updates: DEVICE_METADATA, SNMP, SNMP_COMMUNITY tables (#2481) da44d71 YANG Validation for ConfigDB Updates: PORT_STORM_CONTROL, PORT_QOS_MAP, BUFFER_PROFILE, BUFFER_PG, BUFFER_QUEUE, BUFFER_POOL, FEATURE, DEFAULT_LOSSLESS_BUFFER_PARAMETER tables (# ba9b628 [sfp] Fix issue: Application Advertisement is not well formatted (#2491) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-daemons ed818f8 [PSU daemon] Support PSU power threshold checking (#288) 707a720 [chassisd] update chassisd to write fabric and lc asics on sep erate table (#311) e8c5657 [ycabled] fix exception-handling logic for ycabled (#306) 905874d [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (#303) 510d330 Fix typo in xcvrd (#313) 9ae551f [ycabled] add support for detach mode in 'active-active' topology (#309) 82fc7a6 Added filtering logic to send filtered fields from DB event (#307) 8a2dad9 [ycabled] fix no port/state returned by grpc server (#308) 4ea12cf Fix xcvrd to support 400G ZR optic (#293) 23b6970 [ycabled] fix naming error for error condition for CLI handling (#302) 501abb2 [ycabled] add some exception catching logic to some vendor specific API's (#301) 534f839 [ycabled] add support for getting grpc secerts via shared file (#298) 3622aac Remove shell=True (#300) 143422b add support to execute new ycable API's, add datetime field to mux_info (#297) 6522c46 [ycabled] add notification for gRPC connection state transitions to IDLE/TRANSIENT_FAILURE (#295) 4b3b238 Install libyang to azure pipeline (#292) 8ff5f37 Use get() to fetch default value from dictionary for port admin_status #286 b03cc74 [Xcvrd] Soak duplicate events and process only updated interested events (#285) 3acb171 [ycable] cleanup logic for creating grpc future ready (#289) ce3b6db [ycabled] fix insert events from xcvrd;cleanup some mux toggle logic (#287) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-common 7c48be2 Add warning/critical thresholds for PSU power (#304) f5ba0d0 Add missing PM and VDM related EEPROM read (#326) 02dd597 implement CMIS set_laser_freq to support 100GHz grid space (#294) Signed-off-by: Stephen Sun <[email protected]> * Revert "Update submodule sonic-platform-daemons" This reverts commit aea648b. Signed-off-by: Stephen Sun <[email protected]>
sonic-net#12791) * Update submodule sonic-utilities 72b9cf9 [psushow & psuutil] Support PSU power threshold checking (sonic-net#2326) dfdc92e Revert "Support the bandit check by GitHub Action (sonic-net#2358)" (sonic-net#2509) 85638b2 YANG Validation for ConfigDB Updates: DEVICE_METADATA, SNMP, SNMP_COMMUNITY tables (sonic-net#2481) da44d71 YANG Validation for ConfigDB Updates: PORT_STORM_CONTROL, PORT_QOS_MAP, BUFFER_PROFILE, BUFFER_PG, BUFFER_QUEUE, BUFFER_POOL, FEATURE, DEFAULT_LOSSLESS_BUFFER_PARAMETER tables (# ba9b628 [sfp] Fix issue: Application Advertisement is not well formatted (sonic-net#2491) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-daemons ed818f8 [PSU daemon] Support PSU power threshold checking (sonic-net#288) 707a720 [chassisd] update chassisd to write fabric and lc asics on sep erate table (sonic-net#311) e8c5657 [ycabled] fix exception-handling logic for ycabled (sonic-net#306) 905874d [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (sonic-net#303) 510d330 Fix typo in xcvrd (sonic-net#313) 9ae551f [ycabled] add support for detach mode in 'active-active' topology (sonic-net#309) 82fc7a6 Added filtering logic to send filtered fields from DB event (sonic-net#307) 8a2dad9 [ycabled] fix no port/state returned by grpc server (sonic-net#308) 4ea12cf Fix xcvrd to support 400G ZR optic (sonic-net#293) 23b6970 [ycabled] fix naming error for error condition for CLI handling (sonic-net#302) 501abb2 [ycabled] add some exception catching logic to some vendor specific API's (sonic-net#301) 534f839 [ycabled] add support for getting grpc secerts via shared file (sonic-net#298) 3622aac Remove shell=True (sonic-net#300) 143422b add support to execute new ycable API's, add datetime field to mux_info (sonic-net#297) 6522c46 [ycabled] add notification for gRPC connection state transitions to IDLE/TRANSIENT_FAILURE (sonic-net#295) 4b3b238 Install libyang to azure pipeline (sonic-net#292) 8ff5f37 Use get() to fetch default value from dictionary for port admin_status sonic-net#286 b03cc74 [Xcvrd] Soak duplicate events and process only updated interested events (sonic-net#285) 3acb171 [ycable] cleanup logic for creating grpc future ready (sonic-net#289) ce3b6db [ycabled] fix insert events from xcvrd;cleanup some mux toggle logic (sonic-net#287) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-common 7c48be2 Add warning/critical thresholds for PSU power (sonic-net#304) f5ba0d0 Add missing PM and VDM related EEPROM read (sonic-net#326) 02dd597 implement CMIS set_laser_freq to support 100GHz grid space (sonic-net#294) Signed-off-by: Stephen Sun <[email protected]> * Revert "Update submodule sonic-platform-daemons" This reverts commit aea648b. Signed-off-by: Stephen Sun <[email protected]>
#12791) * Update submodule sonic-utilities 72b9cf9 [psushow & psuutil] Support PSU power threshold checking (#2326) dfdc92e Revert "Support the bandit check by GitHub Action (#2358)" (#2509) 85638b2 YANG Validation for ConfigDB Updates: DEVICE_METADATA, SNMP, SNMP_COMMUNITY tables (#2481) da44d71 YANG Validation for ConfigDB Updates: PORT_STORM_CONTROL, PORT_QOS_MAP, BUFFER_PROFILE, BUFFER_PG, BUFFER_QUEUE, BUFFER_POOL, FEATURE, DEFAULT_LOSSLESS_BUFFER_PARAMETER tables (# ba9b628 [sfp] Fix issue: Application Advertisement is not well formatted (#2491) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-daemons ed818f8 [PSU daemon] Support PSU power threshold checking (#288) 707a720 [chassisd] update chassisd to write fabric and lc asics on sep erate table (#311) e8c5657 [ycabled] fix exception-handling logic for ycabled (#306) 905874d [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (#303) 510d330 Fix typo in xcvrd (#313) 9ae551f [ycabled] add support for detach mode in 'active-active' topology (#309) 82fc7a6 Added filtering logic to send filtered fields from DB event (#307) 8a2dad9 [ycabled] fix no port/state returned by grpc server (#308) 4ea12cf Fix xcvrd to support 400G ZR optic (#293) 23b6970 [ycabled] fix naming error for error condition for CLI handling (#302) 501abb2 [ycabled] add some exception catching logic to some vendor specific API's (#301) 534f839 [ycabled] add support for getting grpc secerts via shared file (#298) 3622aac Remove shell=True (#300) 143422b add support to execute new ycable API's, add datetime field to mux_info (#297) 6522c46 [ycabled] add notification for gRPC connection state transitions to IDLE/TRANSIENT_FAILURE (#295) 4b3b238 Install libyang to azure pipeline (#292) 8ff5f37 Use get() to fetch default value from dictionary for port admin_status #286 b03cc74 [Xcvrd] Soak duplicate events and process only updated interested events (#285) 3acb171 [ycable] cleanup logic for creating grpc future ready (#289) ce3b6db [ycabled] fix insert events from xcvrd;cleanup some mux toggle logic (#287) Signed-off-by: Stephen Sun <[email protected]> * Update submodule sonic-platform-common 7c48be2 Add warning/critical thresholds for PSU power (#304) f5ba0d0 Add missing PM and VDM related EEPROM read (#326) 02dd597 implement CMIS set_laser_freq to support 100GHz grid space (#294) Signed-off-by: Stephen Sun <[email protected]> * Revert "Update submodule sonic-platform-daemons" This reverts commit aea648b. Signed-off-by: Stephen Sun <[email protected]>
…13009) platform-daemon: 657a26de312d1eb61f15d13953ec1cd09634443 (HEAD, origin/master, origin/HEAD, master) [thermalctld] fix some redundant removal of state DB tables (#315) 56046dc Add new fields to status/dom_sensor/pm tables in STATE_DB for CMIS/C-CMIS (#304) adcd69b Create TRANSCEIVER_DOM_THRESHOLD table in state DB (#320) 0573416 Remove the argument that is causing the xcvrd to crash (#318) platform-common: 8f2dffb (HEAD, origin/master, origin/HEAD, master) Add get_transceiver_status and get_transceiver_pm to API interface (#315) bf2ca02 [syseeprom] Remove the trailing space in the value of VENDOR_EXT field in the eepromTlvInfo decode (#333) 580357f [Ci] Upgrade to bullseye and fix the branch reference issue (#331) 4f17225 Use github code scanning instead of LGTM (#328) ce9aacb EEPROM/DOM Info: The Compliance Code will show "unknown" by using FINISAR 10G LR XCVR (#319) utilities: 208824d (HEAD, origin/master, origin/HEAD, master) YANG Validation for ConfigDB Updates: WARM_RESTART, SFLOW_SESSION, SFLOW, VXLAN_TUNNEL, VXLAN_EVPN_NVO, VXLAN_TUNNEL_MAP, MGMT_VRF_CONFIG, CABLE_LENGTH, VRF tables (#2526) 09b8dd1 [db_migrator] Remove import of swsssdk as it is not supported in master (#2544) 10eb5ba Support syslog rate limit configuration for containers and host (#2454) ca9a020 [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks (#2536) 92c7001 [config] Add check in config interface ip command to block if the interface is portchannel member (#2539) e8130f5 [system-health] Improve code structure of system health CLIs (#2453) 00c01b3 Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table (#2535) 42f51c2 sonic-utilities: Update config reload() to verify formatting of an input file (#2529) a5e1e2b [GCU] Add RemoveCreateOnlyDependency Validator/Generator (#2500) 6411b52 [QoS] Introduce delay to the qos reload flow (#2503) fce7ec3 Use github code scanning instead of LGTM (#2530) 91bd6de Change show kube command default value of insecure key to True (#2517) c44c584 Add db_migrator_constants.py script to setup.py (#2534) 6a3238e [drop counters] Fix CLI script for unconfigured PGs (#2518) 263810b Update vrf add, del commands for duplicate/non-existing VRFs (#2467) addae73 Port 202012 DB migration changes to newer branches (#2515) 2af8cfa [VXLAN]Fixing traceback in show remotemac when mac moves during command execution (#2506) Signed-off-by: Mihir Patel <[email protected]>
…11 branch (#13203) Why I did it advance sonic-platform-daemons submodule for 202211 branch a35b57d - (HEAD, origin/202211) Remove TODO comments which are no longer needed (Support centec platform #325) (3 days ago) [Junchao-Mellanox] 3a3726b - [thermalctld] fix some redundant removal of state DB tables (configurations are re-generated across reboots #315) (3 days ago) [vdahiya12] c5afac0 - Add new fields to status/dom_sensor/pm tables in STATE_DB for CMIS/C-CMIS (Combine alias_map.json with port_config.ini #304) (3 days ago) [longhuan-cisco] 1a338d4 - Create TRANSCEIVER_DOM_THRESHOLD table in state DB (Fix the reference in docker-snmp-sv2 to deprecated alias_map.json #320) (3 days ago) [mihirpat1] 7c77907 - Remove the argument that is causing the xcvrd to crash (ingrasys-s9100: Add ingrasys switch s9100 #318) (3 days ago) [Vivek] 5a70e7f - [ycabled] fix minor appl_db retrieving logic for update (dockers/docker-snmp-sv2/config.sh still references deprecated alias_map.json file #319) (3 days ago) [vdahiya12] b669533 - Use github code scanning instead of LGTM (Consolidate device-specific files; install as a Debian package #316) (3 days ago) [Liu Shilong] d3c6739 - Pass grid parameter while calling set_laser_freq ([swss]: update sonic-swss to fix buffer configuration on mlnx platform #317) (3 days ago) [mihirpat1] 778f843 - [PSU daemon] Support PSU power threshold checking (Add get_graph service to fetch minigraph automatically #288) (9 days ago) [Stephen Sun] 707a720 - [chassisd] update chassisd to write fabric and lc asics on sep erate table (ingrasys-s9100: Add ingrasys switch s9100 #311) (8 weeks ago) [arlakshm] e8c5657 - [ycabled] fix exception-handling logic for ycabled (Move sysDescription to /etc/snmp #306) (8 weeks ago) [vdahiya12] 905874d - [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (Disable BCM54616S MII isolate mode #303) (9 weeks ago) [vdahiya12] 510d330 - Fix typo in xcvrd ([platform] Add support configurations files for DCS-7060CX-32S #313) (9 weeks ago) [Junchao-Mellanox] 9ae551f - [ycabled] add support for detach mode in 'active-active' topology (minigraph.py crashed when no png is in the minigraph #309) (2 months ago) [vdahiya12] How I did it How to verify it
…] advance submodule head utilities: * 7979b9b 2022-12-05 | Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table (sonic-net#2535) [mihirpat1] swss: * 4ad82c5 2023-01-13 | Changed the BFD default detect multiplier to 10x (sonic-net#2614) (HEAD -> 202205) [siqbal1986] * 4fe7138 2023-01-12 | [MuxOrch] Enabling neighbor when adding in active state (sonic-net#2601) [Nikola Dancejic] sairedis: * 2f6cbd3 2023-01-19 | Fix for [EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac sonic-net#11503 (sonic-net#1173) (github/202205) [anilkpan] platform-common: * 2995989 2022-12-06 | Add get_transceiver_status and get_transceiver_pm to API interface (sonic-net#315) (HEAD -> 202205) [longhuan-cisco] platform-daemons: * d756e1a 2023-01-18 | [Xcvrd]: Fix optics insertion/removal not detected (sonic-net#333) (HEAD -> 202205) [Prince George] * 153ea47 2023-01-18 | Xcvrd should restart if any child thread crashes (sonic-net#326) [mihirpat1] * 2d546b4 2022-12-06 | Add new fields to status/dom_sensor/pm tables in STATE_DB for CMIS/C-CMIS (sonic-net#304) [longhuan-cisco] * 620a2b1 2022-12-05 | Create TRANSCEIVER_DOM_THRESHOLD table in state DB (sonic-net#320) [mihirpat1] * dcad1d6 2022-11-08 | Fix typo in xcvrd (sonic-net#313) [Junchao-Mellanox] Signed-off-by: Ying Xie <[email protected]>
d0e1ccf - [syseeprom] Remove the trailing space in the value of VENDOR_EXT field in the eepromTlvInfo decode (Add Ingrasys S9100 platform submodule #333) (8 minutes ago) b662bf1 - add SOP ROC in bulk status (Add default dhcp_relay.yml file to OneImage build #341) (17 minutes ago) cdc887c - Don't read AUX_MON_TYPE if memory model is flat ([kernel]: update linux kernel to support z9100 #339) (17 minutes ago) 2236776 - Fix TODO comment ([boardcom]: update saibcm to 2.1.3.1-3 #336) (18 minutes ago) 56397d2 - Removing null characters while decoding from syseeprom ([Makefile]: Automatically rebuild sonic-slave #338) (18 minutes ago) 4651bb0 - [Ci] Upgrade to bullseye and fix the branch reference issue ([platform]: add z9100 platform modules #331) (18 minutes ago) caed733 - Add get_transceiver_status and get_transceiver_pm to API interface (configurations are re-generated across reboots #315) (19 minutes ago) 75d7664 - Use github code scanning instead of LGTM ([platform]: add port_config.ini for dell z9100 #328) (4 weeks ago) 94595a8 - Add warning/critical thresholds for PSU power (Combine alias_map.json with port_config.ini #304) (6 weeks ago)
Add warning/critical thresholds for PSU power Signed-off-by: Stephen Sun <[email protected]>
#23172) #### Why I did it src/linkmgrd ``` * 97e22ce - (HEAD -> 202505, origin/202505) [ci] fix libyang dependency (#304) (16 hours ago) [mssonicbld] * c2b2b3d - Lower log level for unsupported link prober type (#305) (16 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
No description provided.