Skip to content
Snippets Groups Projects
Commit c329e7fa authored by Fabian Seidl's avatar Fabian Seidl Committed by Malte Bauch
Browse files

added fix for the case that sbi in the received sbi from GetDevice is nil

parent 62a817e3
No related branches found
No related tags found
1 merge request!248Resolve "A requested Device via gRPC is missing SBI"
Pipeline #97263 passed
...@@ -121,14 +121,18 @@ func fillOnds(pnd networkdomain.NetworkDomain, all bool, did ...string) ([]*ppb. ...@@ -121,14 +121,18 @@ func fillOnds(pnd networkdomain.NetworkDomain, all bool, did ...string) ([]*ppb.
log.Error(err) log.Error(err)
return nil, status.Errorf(codes.Aborted, "%v", err) return nil, status.Errorf(codes.Aborted, "%v", err)
} }
sbi := spb.SouthboundInterface{}
if d.SBI() != nil {
sbi.Id = d.SBI().ID().String()
sbi.Type = d.SBI().Type()
}
onds[i] = &ppb.OrchestratedNetworkingDevice{ onds[i] = &ppb.OrchestratedNetworkingDevice{
Id: id, Id: id,
Name: d.Name(), Name: d.Name(),
Device: dev, Device: dev,
Sbi: &spb.SouthboundInterface{ Sbi: &sbi,
Id: d.SBI().ID().String(),
Type: d.SBI().Type(),
},
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment