From 087a80ece8d8ea5fc24a3a35f0b9ba2be3d2ec50 Mon Sep 17 00:00:00 2001 From: Malte Bauch <malte.bauch@stud.h-da.de> Date: Wed, 17 Nov 2021 18:47:26 +0100 Subject: [PATCH] added mergeoption to the openconfig unmarshal func this allows to update values of the devices ygot.GoStruct and therefore it is possible to request paths with changing values multiple times. --- nucleus/southbound.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nucleus/southbound.go b/nucleus/southbound.go index 9de3b15fe..92446ae2d 100644 --- a/nucleus/southbound.go +++ b/nucleus/southbound.go @@ -114,7 +114,8 @@ func unmarshal(schema *ytypes.Schema, bytes []byte, fields []string, goStruct yg return err } ygot.PruneEmptyBranches(validatedDeepCopy) - return ygot.MergeStructInto(goStruct, validatedDeepCopy) + + return ygot.MergeStructInto(goStruct, validatedDeepCopy, &ygot.MergeOverwriteExistingFields{}) } // getField traverses the GoStruct and returns the field that represents the -- GitLab