Skip to content

Support for UMF Interfaces Model - Front Panel Interfaces - #229

Draft
aliyahhoda wants to merge 1 commit into
sonic-net:masterfrom
aliyahhoda:pr_intfmodel_frontpanel
Draft

Support for UMF Interfaces Model - Front Panel Interfaces#229
aliyahhoda wants to merge 1 commit into
sonic-net:masterfrom
aliyahhoda:pr_intfmodel_frontpanel

Conversation

@aliyahhoda

@aliyahhoda aliyahhoda commented Jun 22, 2026

Copy link
Copy Markdown

Support for UMF Interfaces Model - Front Panel Interfaces

config/id (P4RT id)
state/id
state/hardware-port
state/physical-channel
state/transceiver
state/counters/in-fcs-errors

Component Testing PR - sonic-net/sonic-gnmi#716

Platform.json PR - sonic-net/sonic-buildimage#28688

Unit Testing Result

File: translib/transformer/xfmr_intf_test.go
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_hardware_port_xfmr
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_transceiver_xfmr
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_physical_channel_xfmr
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_pins_if_id_xfmr
=== RUN TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYangPath_intf_get_counters_path_xfmr
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang (0.00s)
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_hardware_port_xfmr (0.00s)
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_transceiver_xfmr (0.00s)
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_intf_physical_channel_xfmr (0.00s)
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYang_pins_if_id_xfmr (0.00s)
--- PASS: TestInvalidInterfaceType_FieldXfmrDbtoYang/DbToYangPath_intf_get_counters_path_xfmr (0.00s)
=== RUN TestInvalidInterfaceType_SubTreeXfmrDbToYang
=== RUN TestInvalidInterfaceType_SubTreeXfmrDbToYang/DbToYang_intf_get_counters_xfmr
--- PASS: TestInvalidInterfaceType_SubTreeXfmrDbToYang (0.00s)
--- PASS: TestInvalidInterfaceType_SubTreeXfmrDbToYang/DbToYang_intf_get_counters_xfmr (0.00s)
=== RUN TestInvalidInterfaceType_YangToDb
=== RUN TestInvalidInterfaceType_YangToDb/YangToDb_pins_if_id_xfmr
--- PASS: TestInvalidInterfaceType_YangToDb (0.00s)
--- PASS: TestInvalidInterfaceType_YangToDb/YangToDb_pins_if_id_xfmr (0.00s)
=== RUN TestDbToYang_intf_hardware_port_xfmr
=== RUN TestDbToYang_intf_hardware_port_xfmr/Success_Path
=== RUN TestDbToYang_intf_hardware_port_xfmr/Error_Path_Trigger_Missing_DB
--- PASS: TestDbToYang_intf_hardware_port_xfmr (0.00s)
--- PASS: TestDbToYang_intf_hardware_port_xfmr/Success_Path (0.00s)
--- PASS: TestDbToYang_intf_hardware_port_xfmr/Error_Path_Trigger_Missing_DB (0.00s)
=== RUN TestDbToYang_intf_transceiver_xfmr
=== RUN TestDbToYang_intf_transceiver_xfmr/Success_Path
=== RUN TestDbToYang_intf_transceiver_xfmr/Error_Path_Trigger_Missing_DB
--- PASS: TestDbToYang_intf_transceiver_xfmr (0.00s)
--- PASS: TestDbToYang_intf_transceiver_xfmr/Success_Path (0.00s)
--- PASS: TestDbToYang_intf_transceiver_xfmr/Error_Path_Trigger_Missing_DB (0.00s)
=== RUN TestDbToYangPath_intf_path_xfmr
=== RUN TestDbToYangPath_intf_path_xfmr/Success_-Valid_Single_Component_Key(Ethernet202)
=== RUN TestDbToYangPath_intf_path_xfmr/Success_-Valid_Single_Component_Key(PortChannel10)
=== RUN TestDbToYangPath_intf_path_xfmr/Failure_-Empty_Table_Key_Components_List
=== RUN TestDbToYangPath_intf_path_xfmr/Failure-Multi_Component_Composite_Key
--- PASS: TestDbToYangPath_intf_path_xfmr (0.00s)
--- PASS: TestDbToYangPath_intf_path_xfmr/Success-Valid_Single_Component_Key(Ethernet202) (0.00s)
--- PASS: TestDbToYangPath_intf_path_xfmr/Success_-Valid_Single_Component_Key(PortChannel10) (0.00s)
--- PASS: TestDbToYangPath_intf_path_xfmr/Failure_-Empty_Table_Key_Components_List (0.00s)
--- PASS: TestDbToYangPath_intf_path_xfmr/Failure-Multi_Component_Composite_Key (0.00s)
=== RUN TestDbToYang_pins_if_id_xfmr
=== RUN TestDbToYang_pins_if_id_xfmr/Failure-Invalid_Interface_Identifier
=== RUN TestDbToYang_pins_if_id_xfmr/Failure-Invalid_ID_Value_String_in_DB
=== RUN TestDbToYang_pins_if_id_xfmr/Failure-ID_Field_Missing_from_DB_Entry
=== RUN TestDbToYang_pins_if_id_xfmr/Failure-DB_Connection_Error
=== RUN TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_ConfigDB
=== RUN TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_ApplDB
=== RUN TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_StateDB
--- PASS: TestDbToYang_pins_if_id_xfmr (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Failure-Invalid_Interface_Identifier (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Failure-Invalid_ID_Value_String_in_DB (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Failure-ID_Field_Missing_from_DB_Entry (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Failure-DB_Connection_Error (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_ConfigDB (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_ApplDB (0.00s)
--- PASS: TestDbToYang_pins_if_id_xfmr/Success-Valid_ID_in_StateDB (0.00s)
=== RUN TestYangToDb_pins_if_id_xfmr
=== RUN TestYangToDb_pins_if_id_xfmr/Success-Valid_Ethernet_ID_Parsed_to_String
=== RUN TestYangToDb_pins_if_id_xfmr/Success-Edge_Case_Zero_ID_Parsed_to_String
=== RUN TestYangToDb_pins_if_id_xfmr/Failure-Interface_KEY_Not_Present_in_URI
=== RUN TestYangToDb_pins_if_id_xfmr/Failure-Invalid_Interface_Identifier_Syntax
=== RUN TestYangToDb_pins_if_id_xfmr/Failure-Unsupported_Interface_Type(Vlan)
=== RUN TestYangToDb_pins_if_id_xfmr/Failure_-Param_is_Nil_Pointer
=== RUN TestYangToDb_pins_if_id_xfmr/Failure-Param_Type_Type-Assertion_Mismatch
--- PASS: TestYangToDb_pins_if_id_xfmr (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Success-Valid_Ethernet_ID_Parsed_to_String (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Success-Edge_Case_Zero_ID_Parsed_to_String (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Failure-Interface_KEY_Not_Present_in_URI (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Failure-Invalid_Interface_Identifier_Syntax (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Failure-Unsupported_Interface_Type(Vlan) (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Failure_-Param_is_Nil_Pointer (0.00s)
--- PASS: TestYangToDb_pins_if_id_xfmr/Failure-Param_Type_Type-Assertion_Mismatch (0.00s)
=== RUN TestGetPortIndex
=== RUN TestGetPortIndex/Success-Valid_Path
=== RUN TestGetPortIndex/Error_1-Invalid_Interface_Name_Syntax
=== RUN TestGetPortIndex/Error_2-Not_IntfTypeEthernet
=== RUN TestGetPortIndex/Error_3-Entry_does_not_Exist
=== RUN TestGetPortIndex/Error_4-DB_Read_Error_or_Entry_Missing
=== RUN TestGetPortIndex/Error_5-Index_Field_Missing_in_DB_Entry
--- PASS: TestGetPortIndex (0.00s)
--- PASS: TestGetPortIndex/Success-Valid_Path (0.00s)
--- PASS: TestGetPortIndex/Error_1-Invalid_Interface_Name_Syntax (0.00s)
--- PASS: TestGetPortIndex/Error_2-Not_IntfTypeEthernet (0.00s)
--- PASS: TestGetPortIndex/Error_3-Entry_does_not_Exist (0.00s)
--- PASS: TestGetPortIndex/Error_4-DB_Read_Error_or_Entry_Missing (0.00s)
--- PASS: TestGetPortIndex/Error_5-Index_Field_Missing_in_DB_Entry (0.00s)
=== RUN TestDbToYang_intf_get_counters_xfmr
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Populate_Counters_Core_Callback_Execution
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Pre-existing_Interfaces_Subtree_Match_Branch
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Redundant_Target_URI_Path_Branch_Coverage
=== RUN TestDbToYang_intf_get_counters_xfmr/Failure-Invalid_Interface_Type_Branch_Coverage
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Counters_Callback_Not_Supported_Branch_Coverage
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Interface_Not_Found_In_Existing_Map_Coverage
=== RUN TestDbToYang_intf_get_counters_xfmr/Success-Nil_State_Component_Verification_Branch_Coverage
--- PASS: TestDbToYang_intf_get_counters_xfmr (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Populate_Counters_Core_Callback_Execution (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Pre-existing_Interfaces_Subtree_Match_Branch (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Redundant_Target_URI_Path_Branch_Coverage (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Failure-Invalid_Interface_Type_Branch_Coverage (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Counters_Callback_Not_Supported_Branch_Coverage (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Interface_Not_Found_In_Existing_Map_Coverage (0.00s)
--- PASS: TestDbToYang_intf_get_counters_xfmr/Success-Nil_State_Component_Verification_Branch_Coverage (0.00s)
=== RUN TestGetSpecificCounterAttr_InFcsErrors
=== RUN TestGetSpecificCounterAttr_InFcsErrors/Success-Hit_InFcsErrors_Target_Case_Branch
=== RUN TestGetSpecificCounterAttr_InFcsErrors/Success-Fallthrough_to_Default_Path_Unhandled
--- PASS: TestGetSpecificCounterAttr_InFcsErrors (0.00s)
--- PASS: TestGetSpecificCounterAttr_InFcsErrors/Success-Hit_InFcsErrors_Target_Case_Branch (0.00s)
--- PASS: TestGetSpecificCounterAttr_InFcsErrors/Success-Fallthrough_to_Default_Path_Unhandled (0.00s)
=== RUN TestDbToYang_intf_physical_channel_xfmr
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Invalid_Interface_Name_Syntax
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Interface_Type_is_Not_Ethernet(PortChannel)
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure_-Lanes_Field_Missing_from_DB_Entry
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Transceiver_Type_Field_Missing_in_StateDB
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Unknown_Transceiver_Type_Map_Lookup_Match
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-DB_Connection_Error
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Port_Index_Field_Missing_from_DB
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure-Transceiver_Entry_Missing_from_StateDB
=== RUN TestDbToYang_intf_physical_channel_xfmr/Failure_-Platform_ChannelOffset_Error
--- PASS: TestDbToYang_intf_physical_channel_xfmr (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Invalid_Interface_Name_Syntax (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Interface_Type_is_Not_Ethernet(PortChannel) (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure
-Lanes_Field_Missing_from_DB_Entry (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Transceiver_Type_Field_Missing_in_StateDB (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Unknown_Transceiver_Type_Map_Lookup_Match (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-DB_Connection_Error (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Port_Index_Field_Missing_from_DB (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure-Transceiver_Entry_Missing_from_StateDB (0.00s)
--- PASS: TestDbToYang_intf_physical_channel_xfmr/Failure
-_Platform_ChannelOffset_Error (0.00s)

File: translib/platform/platform_test.go

=== RUN TestMissingJsonFile
--- PASS: TestMissingJsonFile (0.00s)
=== RUN TestMalformedJsonFile
--- PASS: TestMalformedJsonFile (0.00s)
=== RUN TestMalformedIntfName
--- PASS: TestMalformedIntfName (0.00s)
=== RUN TestMalformedIndex
--- PASS: TestMalformedIndex (0.00s)
=== RUN TestMalformedLanes
--- PASS: TestMalformedLanes (0.00s)
=== RUN TestMalformedPrimary
--- PASS: TestMalformedPrimary (0.00s)
=== RUN TestMalformedAlias
--- PASS: TestMalformedAlias (0.00s)
=== RUN TestPlatIntfAlias
--- PASS: TestPlatIntfAlias (0.00s)
=== RUN TestCalcChannelOffset
--- PASS: TestCalcChannelOffset (0.00s)
=== RUN TestEnsureLoaded
=== RUN TestEnsureLoaded/TestEnsureLoaded
=== RUN TestEnsureLoaded/TestChannelOffset
--- PASS: TestEnsureLoaded (0.00s)
--- PASS: TestEnsureLoaded/TestEnsureLoaded (0.00s)
--- PASS: TestEnsureLoaded/TestChannelOffset (0.00s)
=== RUN TestAliasFallbackLogic
=== RUN TestAliasFallbackLogic/MissingAliasField
=== RUN TestAliasFallbackLogic/EmptyAliasString
--- PASS: TestAliasFallbackLogic (0.00s)
--- PASS: TestAliasFallbackLogic/MissingAliasField (0.00s)
--- PASS: TestAliasFallbackLogic/EmptyAliasString (0.00s)
=== RUN TestPrimaryLinking
platform_test.go:387: SUCCESS: Ethernet0_Child correctly linked to primary Ethernet0
--- PASS: TestPrimaryLinking (0.00s)
PASS
coverage: 82.2% of statements in ../translib/platform

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 9e4aed3 to 7b6ea0d Compare July 7, 2026 10:33
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 7b6ea0d to e3afe8c Compare July 7, 2026 11:02
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from e3afe8c to 2a34ca1 Compare July 7, 2026 11:08
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 2a34ca1 to 75f5d4f Compare July 7, 2026 12:12
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 75f5d4f to 9dc3a0a Compare July 7, 2026 17:51
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 9dc3a0a to d0fafff Compare July 8, 2026 18:43
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread translib/transformer/xfmr_intf.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/transformer/xfmr_intf_test.go Outdated
Comment thread translib/transformer/xfmr_intf.go Outdated
Comment thread translib/platform/platform.go
Comment thread translib/platform/platform.go
Comment thread models/yang/openconfig-p4rt.yang Outdated
Comment thread models/yang/openconfig-p4rt.yang Outdated
Comment thread translib/transformer/xfmr_intf.go Outdated
Comment thread translib/transformer/xfmr_intf.go Outdated
@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from d0fafff to ec7dab0 Compare July 10, 2026 06:24
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/platform/platform.go Outdated
Comment thread translib/transformer/xfmr_intf.go
Comment thread translib/transformer/xfmr_intf.go Outdated
@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from ec7dab0 to 9549695 Compare July 21, 2026 16:35
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aliyahhoda

Copy link
Copy Markdown
Author

@ndas7 @rlucus Kindly review the PR.

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from 9549695 to d07be1c Compare July 28, 2026 17:56
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from d07be1c to c0b94b7 Compare July 29, 2026 14:49
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aliyahhoda

Copy link
Copy Markdown
Author

@ndas7 @rlucus Kindly review the PR.

Signed-off-by: Aliyah Hoda <ahoda@google.com>
@aliyahhoda
aliyahhoda force-pushed the pr_intfmodel_frontpanel branch from c0b94b7 to d78a146 Compare August 3, 2026 09:21
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants