Skip to content

Add initial support for Ciena (saos and waverouter)#708

Open
marcushines wants to merge 1 commit into
mainfrom
hines-fork
Open

Add initial support for Ciena (saos and waverouter)#708
marcushines wants to merge 1 commit into
mainfrom
hines-fork

Conversation

@marcushines

Copy link
Copy Markdown
Contributor
  • Modified proto/topo/topo.proto
    • add Ciena vendor and ciena_saos type
  • Modified proto/topo/topo.pb.go
    • changes generated by topo.proto
  • Modified topo/topo.go
    • add ciena node into import
  • Added topo/node/ciena/ciena.go
    • ciena node implementation
  • Added proto/ciena.proto
    • add Ciena proto - define Ciena specific vendor data for KNE
  • Added proto/ciena/ciena.pb.go
    • file generated by proto/ciena.proto

* Modified proto/topo/topo.proto
  * add Ciena vendor and ciena_saos type
* Modified proto/topo/topo.pb.go
  * changes generated by topo.proto
* Modified topo/topo.go
  * add ciena node into import
* Added topo/node/ciena/ciena.go
  * ciena node implementation
* Added proto/ciena.proto
  * add Ciena proto - define Ciena specific vendor data for KNE
* Added proto/ciena/ciena.pb.go
  * file generated by proto/ciena.proto
@dpelton-ciena

Copy link
Copy Markdown

@marcushines - thanks for rebasing these changes. If you need any additional input from Ciena folks, please let me know.

Comment thread topo/node/ciena/ciena.go
for k, v := range interfaces {
switch {
case reFull.MatchString(k):
parts := regexp.MustCompile(`/`).Split(k, -1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Recommend strings.Split(k, "/") over regex in the loop.

Also, taking lastNum maps ports across different slots (e.g. 1/5/1 & 1/6/1) to the same eth1—wondering if we should incorporate slot numbers to avoid collisions and add unit tests for this case (is this is a valid scenario)?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are correct that the use of lastNum clobbers interfaces across different slots. This code was written and tested using only a single interface card (i.e. only simulating one slot). We (Ciena) will need to add more logic to properly handle the name to port allocation for multiple slots, as the number of interfaces per slot can vary depending on the card type.

To address this for now, we can either live with the one slot restriction or remove the buggy code that maps the "housing/slot/port" string and force the use of the equivalent "ethX" numbering. Our internal KNE testing has been focused on the pizza box devices rather than the housing based devices.

Comment thread topo/node/ciena/ciena.go
}
cm.Data[fileName] = string(contents)
extraMounts = append(extraMounts, corev1.VolumeMount{
Name: "equipment-file",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delete method in default node implementation in node.go:565, DeleteConfig filters specifically for vol.Name == ConfigVolumeName ("startup-config-volume").

Since the equipment file volume here is named "equipment-file", DeleteConfig skips it during kne delete. Would it make sense to add a custom Delete method to also clean up the -file ConfigMap?

Comment thread topo/node/ciena/ciena.go
@@ -0,0 +1,340 @@
// Copyright 2025 Ciena Corporation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cienna.go / cienna_test.go both need gofmt run on them (I will fix CI checks for this... I thought this was in there but it seems like it may not be.).

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.

5 participants