Handle multiple HA domain numbers

Fix the domain number logic to get them for every
interface configured in the phc2sys.

Test plan:
PASS: Verify ptp plugin startup and general operation
PASS: Verify that alarm is raised when clock source has
no lock.
PASS: Verify that alarm is cleared when clock source
has lock.

Story: 2010723
Task: 49440

Change-Id: Ic604cf17626ec295eb5de19555b0bf9e32b8be26
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
This commit is contained in:
Andre Mauricio Zelak 2024-01-22 14:19:45 -03:00
parent 53651e906f
commit 4afb9305c6
1 changed files with 2 additions and 2 deletions

View File

@ -2349,9 +2349,9 @@ def process_phc2sys_ha(ctrl):
# Get the domain number for the interface ptp instance, check global domain if not
# configured
# If both interface and global domain number are not present, default to 0
if ctrl.timing_instance.config.has_section(phc2sys_source_interface):
if ctrl.timing_instance.config.has_section(interface):
domain_number = \
ctrl.timing_instance.config[phc2sys_source_interface].get(
ctrl.timing_instance.config[interface].get(
'ha_domainNumber', None)
if domain_number is None:
domain_number = ctrl.timing_instance.config['global'].get(