Skip to content
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

Cisco logical channels #3470

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

karthikeya-remilla
Copy link
Contributor

@karthikeya-remilla karthikeya-remilla commented Sep 27, 2024

Changes for zr_logical_channels_test:

  1. operationalMode flag
  2. cisco numbering deviations for eth and otn channels
  3. eth and otn channels' index testcases based on deviations

Note: ciscoOpticalChannelFormat := strings.ReplaceAll(opticalChannel, "/", "_") // Ex: OpticalChannel0_0_0_18

This is temporary line under the deviation till Cisco supports OpticalChannel in standard OpticalChannel0/0/0/18 format. Internal bug raised and in progress.

@coveralls
Copy link

coveralls commented Sep 27, 2024

Pull Request Test Coverage Report for Build 11111420277

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.268%

Totals Coverage Status
Change from base Build 11110555512: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls

@@ -146,6 +148,25 @@ func validateEthernetChannelTelemetry(t *testing.T, otnChIdx, ethernetChIdx uint
want: oc.Assignment_AssignmentType_LOGICAL_CHANNEL.String(),
},
}
var assignmentIndexTestcase struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you define a struct type near the top:

type testcase struct {
desc string
got any
want any
}

Then around line 105, you can have:

tcs := []testcase {

}

Then here, this just changes to:

assignmentIndexTestCase := testcase{
desc: "Assignment: Index",
got: ec.GetAssignment(0).GetIndex(),
want: uint32(0),
})
if deviations.EthChannelAssignmentCiscoNumbering(dut) {
assignmentIndexTestCase.want = uint32(1)
}
tcs = append(tcs, assignmentIndexTestCase)

want: oc.Assignment_AssignmentType_LOGICAL_CHANNEL.String(),
},
}
var assignmentIndexTestcase struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please consider previous comment to avoid lots of redeclaring this struct definition.

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