Skip to content
Snippets Groups Projects
Commit 7603be24 authored by Malte Bauch's avatar Malte Bauch
Browse files

Model is not updated through applyDiff method anymore

parent d48c8270
No related branches found
No related tags found
1 merge request!464Resolve "A change confirm updates the network element multiple times"
......@@ -858,10 +858,7 @@ func (n *NetworkElementServer) ChangeMNE(duid uuid.UUID, operation mnepb.ApiOper
ctx := context.WithValue(context.Background(), types.CtxKeyOperation, operation) // nolint
payload := change.Payload{Original: original, Modified: modified}
pathToSet := path
if err := mne.Transport().Set(ctx, payload, pathToSet, plugin); err != nil {
return err
}
return n.mneService.Update(mne)
return mne.Transport().Set(ctx, payload, pathToSet, plugin)
}
currentModel, err := mne.GetModelAsFilteredCopy()
......
......@@ -136,20 +136,6 @@ func (g *Gnmi) applyDiff(ctx context.Context, payload change.Payload, path *gpb.
}
log.Info(resp)
// apply diffs to the plugin of the managed network element.
for _, update := range updates {
err := plugin.SetNode(update.GetPath(), update.GetVal())
if err != nil {
return err
}
}
for _, del := range deletes {
err := plugin.DeleteNode(del)
if err != nil {
return err
}
}
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment