A requested Device via gRPC is missing SBI
The following discussion from !238 (merged) should be addressed:
-
@istmabauc started a discussion: (+2 comments) In this case, the return of the corresponding SBI is missing. A simple fix should be the following:
onds[i] = &ppb.OrchestratedNetworkingDevice{ Id: id, Name: d.Name(), Device: dev, Sbi: &spb.SouthboundInterface{ Id: d.SBI().ID().String(), Type: d.SBI().Type(), }
However, we should probably reconsider where we always want to return whole objects (be it PNDs, SBIs, etc.), as in some cases simply an ID might be enough.
-
@istmabauc started a discussion: The copied device is not complete. This would cause problems with my suggestion in !238 (comment 229627).
copiedDevice := &CommonDevice{name: d.Name(), UUID: d.ID(), GoStruct: copiedGoStruct, sbi: d.SBI()}
I'm not quite sure why we copy the device here. However, this is a topic for a new issue.
Edited by Ghost User