Skip to content
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

Avoid loading media_settings.json on mellanox platforms if the host cmis management feature is disabled #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sonic-xcvrd/xcvrd/xcvrd_utilities/media_settings_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import ast

from sonic_platform.device_data import DeviceDataManager
tshalvi marked this conversation as resolved.
Show resolved Hide resolved
from sonic_py_common import device_info, logger
from swsscommon import swsscommon
from xcvrd import xcvrd
Expand All @@ -22,6 +23,11 @@

def load_media_settings():
global g_dict

if device_info.get_sonic_version_info()['asic_type'] == 'mellanox':
if not DeviceDataManager.is_module_host_management_mode():
return {}

(platform_path, hwsku_path) = device_info.get_paths_to_platform_and_hwsku_dirs()

# Support to fetch media_settings.json both from platform folder and HWSKU folder
Expand Down