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

improved handling of repsonse types

parent 204a8bf1
No related branches found
No related tags found
3 merge requests!376Add additional example application hostname-checker,!343Add basic application framework and example application to show interaction between events an NBI,!342Resolve "Add an option to send gNMI Subscribe requests via SBI"
Pipeline #110110 passed
...@@ -257,12 +257,18 @@ func (g *Gnmi) ProcessControlPlaneSubscribeResponse(resp *gpb.SubscribeResponse_ ...@@ -257,12 +257,18 @@ func (g *Gnmi) ProcessControlPlaneSubscribeResponse(resp *gpb.SubscribeResponse_
} }
notification := resp.Update notification := resp.Update
if err := g.processResponseUpdates(notification.Update, dModel, root.(ygot.ValidatedGoStruct), schema); err != nil {
return err if len(notification.Update) > 0 {
if err := g.processResponseUpdates(notification.Update, dModel, root.(ygot.ValidatedGoStruct), schema); err != nil {
return err
}
} }
//TODO: maybe remove and combine into one function/method! //TODO: maybe remove and combine into one function/method!
if err := g.processResponseDeletes(notification.Delete, dModel, schema); err != nil { if len(notification.Delete) > 0 {
return err if err := g.processResponseDeletes(notification.Delete, dModel, schema); err != nil {
return err
}
} }
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment