Support for UMF Interfaces Model -CPU model - #231
Draft
ksravani-hcl wants to merge 1 commit into
Draft
ksravani-hcl wants to merge 1 commit into
ksravani-hcl wants to merge 1 commit into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 8, 2026 04:30
8ef9721 to
5aff74e
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 8, 2026 04:37
5aff74e to
4009201
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 05:38
4009201 to
384dc42
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 05:44
384dc42 to
e4d7246
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 05:49
e4d7246 to
48c1c46
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 05:57
48c1c46 to
b4126cc
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 05:58
b4126cc to
477167a
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 06:18
477167a to
6d18ca8
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
July 9, 2026 06:23
6d18ca8 to
9a3cb48
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 21, 2026 10:46
e4ecb26 to
eb99200
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 21, 2026 12:35
eb99200 to
dd1920e
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 21, 2026 13:26
dd1920e to
d2b26d9
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
2 times, most recently
from
August 21, 2026 14:19
cfb0b97 to
8515334
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 24, 2026 11:47
8515334 to
54b9909
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 24, 2026 13:13
54b9909 to
7a24537
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
August 24, 2026 14:19
7a24537 to
0091f0a
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Author
Author
|
@kwangsuk, @Verma-Anukul Can you please review the PR. |
Signed-off-by: SRAVANI KANASANI <ksravani-hcl>
ksravani-hcl
force-pushed
the
pr_intfmodel_cpu
branch
from
September 17, 2026 06:49
0091f0a to
bbdad3f
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ndas7
reviewed
Sep 18, 2026
| return fmt.Errorf("%w; getMembers() for %s failed", err, ifName) | ||
| } | ||
|
|
||
| for _, member := range members { |
Contributor
There was a problem hiding this comment.
Both IPv4 and IPv6 transformers call populatePortCounters but ignore its returned error. If the OID mapping or COUNTERS entry is missing, the transformer can return success with incomplete or empty counters, making backend failures appear as valid telemetry. Please propagate the error, or explicitly distinguish “counter not supported” from a failed DB lookup.
for _, member := range members {
var mcounters ...Counters
- populatePortCounters(inParams, member, &mcounters)
+ if err := populatePortCounters(inParams, member, &mcounters); err != nil {
+ return err
+ }
sumV4Counters(v4_counters, &mcounters)
}
| } | ||
| } | ||
|
|
||
| deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:port-speed { |
Contributor
There was a problem hiding this comment.
These are already defined above, and will cause duplicate updates
| } | ||
| } | ||
|
|
||
| deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:port-speed { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support for UMF Interfaces Model -CPU model
counters (general, ethernet,subinterface)
management/cpu
mac-address
description
oper-status
port-speed
enabled
mtu
id
Component Testing PR - sonic-net/sonic-gnmi#737
Unit Testing Result
=== RUN TestCPU_DbToYang_intf_cpu_xfmr
=== RUN TestCPU_DbToYang_intf_cpu_xfmr/Success_-CPU
=== RUN TestCPU_DbToYang_intf_cpu_xfmr/Success-Non_CPU
=== RUN TestCPU_DbToYang_intf_cpu_xfmr/Failure-No_Key
--- PASS: TestCPU_DbToYang_intf_cpu_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_intf_cpu_xfmr/Success-CPU (0.00s)
--- PASS: TestCPU_DbToYang_intf_cpu_xfmr/Success-Non_CPU (0.00s)
--- PASS: TestCPU_DbToYang_intf_cpu_xfmr/Failure-No_Key (0.00s)
=== RUN TestCPU_DbToYang_intf_description_xfmr
=== RUN TestCPU_DbToYang_intf_description_xfmr/Successful_Retrieval
=== RUN TestCPU_DbToYang_intf_description_xfmr/Missing_Description_Field
=== RUN TestCPU_DbToYang_intf_description_xfmr/Invalid_Interface_Name
--- PASS: TestCPU_DbToYang_intf_description_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_intf_description_xfmr/Successful_Retrieval (0.00s)
--- PASS: TestCPU_DbToYang_intf_description_xfmr/Missing_Description_Field (0.00s)
--- PASS: TestCPU_DbToYang_intf_description_xfmr/Invalid_Interface_Name (0.00s)
=== RUN TestCPU_DbToYang_pins_ifindex_xfmr
=== RUN TestCPU_DbToYang_pins_ifindex_xfmr/Successful_ID_Parsing
=== RUN TestCPU_DbToYang_pins_ifindex_xfmr/Non-numeric_ID
=== RUN TestCPU_DbToYang_pins_ifindex_xfmr/Missing_Entry
--- PASS: TestCPU_DbToYang_pins_ifindex_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_pins_ifindex_xfmr/Successful_ID_Parsing (0.00s)
--- PASS: TestCPU_DbToYang_pins_ifindex_xfmr/Non-numeric_ID (0.00s)
--- PASS: TestCPU_DbToYang_pins_ifindex_xfmr/Missing_Entry (0.00s)
=== RUN TestCPU_DbToYang_intf_ipv4_counters_xfmr_PortChannel
--- PASS: TestCPU_DbToYang_intf_ipv4_counters_xfmr_PortChannel (0.00s)
=== RUN TestCPU_DbToYang_intf_ipv6_counters_xfmr_Ethernet
--- PASS: TestCPU_DbToYang_intf_ipv6_counters_xfmr_Ethernet (0.00s)
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr/CPU_Interface
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr/Management_Interface-eth_prefix
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr/Management_Interface-mgmt_prefix
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr/Standard_Interface
=== RUN TestCPU_DbToYang_intf_mgmt_xfmr/Missing_Name_Key
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr/CPU_Interface (0.00s)
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr/Management_Interface-eth_prefix (0.00s)
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr/Management_Interface-mgmt_prefix (0.00s)
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr/Standard_Interface (0.00s)
--- PASS: TestCPU_DbToYang_intf_mgmt_xfmr/Missing_Name_Key (0.00s)
=== RUN TestCPU_DbToYang_intf_eth_mac_address_xfmr
=== RUN TestCPU_DbToYang_intf_eth_mac_address_xfmr/Explicit
=== RUN TestCPU_DbToYang_intf_eth_mac_address_xfmr/Fallback
--- PASS: TestCPU_DbToYang_intf_eth_mac_address_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_intf_eth_mac_address_xfmr/Explicit (0.00s)
--- PASS: TestCPU_DbToYang_intf_eth_mac_address_xfmr/Fallback (0.00s)
=== RUN TestCPU_SumV4Counters_AllFields
--- PASS: TestCPU_SumV4Counters_AllFields (0.00s)
=== RUN TestCPU_SumV6Counters_AllFields
--- PASS: TestCPU_SumV6Counters_AllFields (0.00s)
=== RUN TestCPU_GetSpecificCounterAttr_Subinterface
--- PASS: TestCPU_GetSpecificCounterAttr_Subinterface (0.00s)
=== RUN TestCPU_DbToYang_intf_oper_status_xfmr
=== RUN TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Up
=== RUN TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Down_Branch
=== RUN TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Unknown_Default_Branch
=== RUN TestCPU_DbToYang_intf_oper_status_xfmr/CPU_Interface_Always_Up
--- PASS: TestCPU_DbToYang_intf_oper_status_xfmr (0.00s)
--- PASS: TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Up (0.00s)
--- PASS: TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Down_Branch (0.00s)
--- PASS: TestCPU_DbToYang_intf_oper_status_xfmr/Oper_Status_Unknown_Default_Branch (0.00s)
--- PASS: TestCPU_DbToYang_intf_oper_status_xfmr/CPU_Interface_Always_Up (0.00s)
=== RUN TestCPU_PopulatePortCounters
=== RUN TestCPU_PopulatePortCounters/Success-IPv4_Subinterface_Counters_with_Explicit_ifName
=== RUN TestCPU_PopulatePortCounters/Success-IPv6_Subinterface_Counters_with_URI_Fallback_ifName
--- PASS: TestCPU_PopulatePortCounters (0.00s)
--- PASS: TestCPU_PopulatePortCounters/Success-IPv4_Subinterface_Counters_with_Explicit_ifName (0.00s)
--- PASS: TestCPU_PopulatePortCounters/Success-_IPv6_Subinterface_Counters_with_URI_Fallback_ifName (0.00s)
PASS