Skip to content

Fix CCmisApi identifier overrides ycable identifier in syslog. #409

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

Closed
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
8 changes: 5 additions & 3 deletions sonic_platform_base/sonic_xcvr/api/public/c_cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
from sonic_py_common import logger
from ...fields import consts
from .cmis import CmisApi
import logging
import time


BYTELENGTH = 8
VDM_FREEZE = 128
VDM_UNFREEZE = 0
SYSLOG_IDENTIFIER = "CCmisApi"

helper_logger = logger.Logger(SYSLOG_IDENTIFIER)

class CCmisApi(CmisApi):
def __init__(self, xcvr_eeprom):
super(CCmisApi, self).__init__(xcvr_eeprom)
logging.basicConfig(level=logging.DEBUG)

def get_freq_grid(self):
'''
Expand Down Expand Up @@ -814,7 +816,7 @@ def get_transceiver_status(self):
trans_status['rxsigpowerhighwarning_flag'] = self.vdm_dict['Rx Signal Power [dBm]'][1][7]
trans_status['rxsigpowerlowwarning_flag'] = self.vdm_dict['Rx Signal Power [dBm]'][1][8]
except KeyError:
helper_logger.log_debug('fields not present in VDM')
logging.debug('fields not present in VDM')
return trans_status

def get_transceiver_pm(self):
Expand Down