Skip to content

Component Test for Interface Model - PortChannel - #752

Open
divyagayathri-hcl wants to merge 1 commit into
sonic-net:masterfrom
divyagayathri-hcl:componenttest_intfmodel_portchannel
Open

divyagayathri-hcl wants to merge 1 commit into
sonic-net:masterfrom
divyagayathri-hcl:componenttest_intfmodel_portchannel

Conversation

@divyagayathri-hcl

@divyagayathri-hcl divyagayathri-hcl commented Aug 17, 2026

Copy link
Copy Markdown

This PR is created to add component test cases for Interface Model - PortChannel.

Base PR - sonic-net/sonic-mgmt-common#241

Test Output:

=== RUN   TestGnmiGetPortChannelLagType
=== RUN   TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(LACP)
    server_test.go:1794: [TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(LACP)/Get OC PortChannel LAG Type (LACP)] gotVal:
            {
              "openconfig-if-aggregate:lag-type": "LACP"
            }
=== RUN   TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(STATIC)
    server_test.go:1794: [TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(STATIC)/Get OC PortChannel LAG Type (STATIC)] gotVal:
            {
              "openconfig-if-aggregate:lag-type": "STATIC"
            }
--- PASS: TestGnmiGetPortChannelLagType (1.21s)
    --- PASS: TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(LACP) (0.06s)
    --- PASS: TestGnmiGetPortChannelLagType/Get_OC_PortChannel_LAG_Type_(STATIC) (0.04s)
=== RUN   TestGnmiGetTranslibXfmrPortChannel
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_Config
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_Config/Get OpenConfig PortChannel lag-type Config] gotVal:
            {
              "openconfig-if-aggregate:lag-type": "LACP"
            }
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_State
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_State/Get OpenConfig PortChannel lag-type State] gotVal:
            {
              "openconfig-if-aggregate:lag-type": "LACP"
            }
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-speed_State
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-speed_State/Get OpenConfig PortChannel lag-speed State] gotVal:
            {
              "openconfig-if-aggregate:lag-speed": 10000
            }
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_members_State
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_members_State/Get OpenConfig PortChannel members State] gotVal:
            {
              "openconfig-if-aggregate:member": [
                "Ethernet0"
              ]
            }
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_Entire_State
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_Entire_State/Get OpenConfig PortChannel Aggregation Entire State] gotVal:
            {
              "openconfig-if-aggregate:state": {
                "lag-speed": 10000,
                "lag-type": "LACP",
                "member": [
                  "Ethernet0"
                ],
                "min-links": 1
              }
            }
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_Entire_Subtree_with_Wildcard
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_State_Subtree_with_Wildcard
=== RUN   TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Interface_Top_Level
    server_test.go:2037: [TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Interface_Top_Level/Get OpenConfig PortChannel Interface Top Level] gotVal:
            {
              "openconfig-interfaces:interface": [
                {
                  "config": {
                    "enabled": true,
                    "mtu": 9100,
                    "name": "PortChannel111"
                  },
                  "name": "PortChannel111",
                  "openconfig-if-aggregate:aggregation": {
                    "config": {
                      "lag-type": "LACP",
                      "min-links": 1
                    },
                    "state": {
                      "lag-speed": 10000,
                      "lag-type": "LACP",
                      "member": [
                        "Ethernet0"
                      ],
                      "min-links": 1
                    }
                  },
                  "state": {
                    "admin-status": "UP",
                    "enabled": true,
                    "mtu": 9100,
                    "name": "PortChannel111"
                  },
                  "subinterfaces": {
                    "subinterface": [
                      {
                        "config": {
                          "index": 0
                        },
                        "index": 0,
                        "openconfig-if-ip:ipv6": {
                          "config": {
                            "enabled": false
                          },
                          "state": {
                            "enabled": false
                          }
                        },
                        "state": {
                          "index": 0
                        }
                      }
                    ]
                  }
                }
              ]
            }
--- PASS: TestGnmiGetTranslibXfmrPortChannel (4.48s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_Config (0.05s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-type_State (0.04s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_lag-speed_State (0.04s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_members_State (0.03s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_Entire_State (0.03s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_Entire_Subtree_with_Wildcard (0.02s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Aggregation_State_Subtree_with_Wildcard (0.02s)
    --- PASS: TestGnmiGetTranslibXfmrPortChannel/Get_OpenConfig_PortChannel_Interface_Top_Level (0.12s)
=== RUN   TestGnmiLagTypeTransformer
=== RUN   TestGnmiLagTypeTransformer/LagType_Conflict_Error
--- PASS: TestGnmiLagTypeTransformer (1.61s)
    --- PASS: TestGnmiLagTypeTransformer/LagType_Conflict_Error (0.03s)
PASS

@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@divyagayathri-hcl
divyagayathri-hcl force-pushed the componenttest_intfmodel_portchannel branch from e35ffa7 to 6b768a9 Compare August 17, 2026 18:32
@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@divyagayathri-hcl
divyagayathri-hcl marked this pull request as draft August 17, 2026 18:32
@mssonicbld

Copy link
Copy Markdown
Contributor

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@niranjanivivek

Copy link
Copy Markdown
Contributor

@ndas7 @rlucus Please review

@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

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

@divyagayathri-hcl
divyagayathri-hcl marked this pull request as ready for review August 25, 2026 07:32
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@divyagayathri-hcl
divyagayathri-hcl marked this pull request as draft August 25, 2026 14:34
@divyagayathri-hcl
divyagayathri-hcl marked this pull request as ready for review August 25, 2026 14:40
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Signed-off-by: divyagayathri-hcl <divyagayathri.s@hcl.com>
@divyagayathri-hcl
divyagayathri-hcl force-pushed the componenttest_intfmodel_portchannel branch from e93dd46 to 63b02c5 Compare September 9, 2026 16:00
@mssonicbld

Copy link
Copy Markdown
Contributor

/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