Skip to content
Snippets Groups Projects
Commit 18aa15ce authored by Fabian Seidl's avatar Fabian Seidl
Browse files

Merge branch '167-a-requested-device-via-grpc-is-missing-sbi' into 'develop'

Resolve "A requested Device via gRPC is missing SBI"

See merge request !248
parents 6d359356 c329e7fa
No related branches found
No related tags found
No related merge requests found
Pipeline #97262 passed
...@@ -121,10 +121,18 @@ func fillOnds(pnd networkdomain.NetworkDomain, all bool, did ...string) ([]*ppb. ...@@ -121,10 +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: &sbi,
} }
} }
......
...@@ -217,7 +217,7 @@ func (pnd *pndImplementation) GetDevice(identifier string) (device.Device, error ...@@ -217,7 +217,7 @@ func (pnd *pndImplementation) GetDevice(identifier string) (device.Device, error
return nil, err return nil, err
} }
copiedDevice := &CommonDevice{name: d.Name(), UUID: d.ID(), GoStruct: copiedGoStruct} copiedDevice := &CommonDevice{name: d.Name(), UUID: d.ID(), GoStruct: copiedGoStruct, sbi: d.SBI()}
return copiedDevice, nil return copiedDevice, nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment