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 transceiver 3 #3457

Merged
merged 18 commits into from
Sep 30, 2024

Conversation

karthikeya-remilla
Copy link
Contributor

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

Changes for the tests:

  1. zr_fec_uncorrectable_frames_test: added deviations in metadata.textproto
  2. zr_firmware_version_test: changes from previous open PR ZR Transceiver3 test changes #3071 to consume latest cfgplugins functions

@OpenConfigBot
Copy link

OpenConfigBot commented Sep 25, 2024

Pull Request Functional Test Report for #3457 / 1341d5c

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Cisco 8000E status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Cisco XRd status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Juniper ncPTX status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Nokia SR Linux status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Openconfig Lemming status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Cisco 8808 status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Juniper PTX10008 status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming
Nokia 7250 IXR-10e status
status
status
TRANSCEIVER-5: Configuration: 400ZR channel frequency, output TX launch power and operational mode setting.
TRANSCEIVER-10: Telemetry: 400ZR Optics FEC(Forward Error Correction) Uncorrectable Frames Streaming.
TRANSCEIVER-3: Telemetry: 400ZR Optics firmware version streaming

Help

@coveralls
Copy link

coveralls commented Sep 25, 2024

Pull Request Test Coverage Report for Build 11071143372

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 11069560355: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls

internal/deviations/deviations.go Outdated Show resolved Hide resolved
internal/deviations/deviations.go Outdated Show resolved Hide resolved
}

// ConfigETHChannel configures the ETH channel.
func ConfigETHChannel(t *testing.T, dut *ondatra.DUTDevice, interfaceName, transceiverName string, otnIndex, ethIndex uint32) {
t.Helper()
gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), &oc.TerminalDevice_Channel{

Choose a reason for hiding this comment

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

Would you mind if we write this slightly differently to reduce some repeated lines?

Something like:

channnel := &oc.TerminalDevice_Channel{
	Description:        ygot.String("ETH Logical Channel"),
	Index:              ygot.Uint32(ethIndex),
	LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_ETHERNET,
	TribProtocol:       oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE,
	Ingress: &oc.TerminalDevice_Channel_Ingress{
		Interface:   ygot.String(interfaceName),
		Transceiver: ygot.String(transceiverName),
	},
	Assignment: map[uint32]*oc.TerminalDevice_Channel_Assignment{
		0: {
			Index:          ygot.Uint32(0),
			LogicalChannel: ygot.Uint32(otnIndex),
			Description:    ygot.String("ETH to OTN"),
			Allocation:     ygot.Float64(400),
			AssignmentType: oc.Assignment_AssignmentType_LOGICAL_CHANNEL,
		},
	},
}
if !deviations.ETHChannelIngressParametersUnsupported(dut) {
	channnel.Ingress = &oc.TerminalDevice_Channel_Ingress{
		Interface:   ygot.String(interfaceName),
		Transceiver: ygot.String(transceiverName),
	}
}
gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), channnel)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ejbrever, thank you for your review. I incorporated above suggestions.

Regarding this block, there are 3 differences in Cisco's ZR implementation:

  1. Cisco channel indexing starts from 1 instead of 0
  2. RateClass parameter = oc.TransportTypes_TRIBUTARY_RATE_CLASS_TYPE_TRIB_RATE_400G is required
  3. Ingress parameters are not supported.

3 deviations for a single usecase might be an overkill, so I put them under the above code block for readability.

Could you please suggest how we might implement this?

Choose a reason for hiding this comment

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

For the rate class, can you please add this as the default in both cases. I think that should always actually be there, so then for that item we don't have to worry about the diff.

The other two I do think are unique deviations IMHO. Can you create deviations for those two please?

As a variant of the initial restructure then, maybe we could have something like:

var ingress &oc.TerminalDevice_Channel_Ingress
if deviations.ETHChannelIngressParametersUnsupported(dut) {
	ingress = <...>
}

assignments := <default>
if deviations.ETHChannelAssignmentCiscoNumbering(dut) {
	assignments = <...>
}

channnel := &oc.TerminalDevice_Channel{
	Description:        ygot.String("ETH Logical Channel"),
	Index:              ygot.Uint32(ethIndex),
	LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_ETHERNET,
	TribProtocol:       oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE,
	Ingress: ingress,
	Assignment: assignments,
}
gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), channnel)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack - implemented something similar to your suggestion. PTAL.

Added an if-else block for the deviation for readability.

internal/cfgplugins/interface.go Show resolved Hide resolved
}

// ConfigETHChannel configures the ETH channel.
func ConfigETHChannel(t *testing.T, dut *ondatra.DUTDevice, interfaceName, transceiverName string, otnIndex, ethIndex uint32) {
t.Helper()
gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), &oc.TerminalDevice_Channel{

Choose a reason for hiding this comment

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

For the rate class, can you please add this as the default in both cases. I think that should always actually be there, so then for that item we don't have to worry about the diff.

The other two I do think are unique deviations IMHO. Can you create deviations for those two please?

As a variant of the initial restructure then, maybe we could have something like:

var ingress &oc.TerminalDevice_Channel_Ingress
if deviations.ETHChannelIngressParametersUnsupported(dut) {
	ingress = <...>
}

assignments := <default>
if deviations.ETHChannelAssignmentCiscoNumbering(dut) {
	assignments = <...>
}

channnel := &oc.TerminalDevice_Channel{
	Description:        ygot.String("ETH Logical Channel"),
	Index:              ygot.Uint32(ethIndex),
	LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_ETHERNET,
	TribProtocol:       oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE,
	Ingress: ingress,
	Assignment: assignments,
}
gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), channnel)

@ahsaanyousaf ahsaanyousaf merged commit bdf96bd into openconfig:main Sep 30, 2024
25 checks passed
@karthikeya-remilla karthikeya-remilla deleted the cisco_transceiver_3 branch October 3, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants