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

renamed `fieldStruct` into `validatedCreatedNode`

parent 94715e56
No related branches found
No related tags found
1 merge request!213Resolve "Specific paths cant be requested, because the underlying device goStruct can't be filled."
Pipeline #89638 failed
This commit is part of merge request !213. Comments created here will be created in the context of that merge request.
......@@ -94,18 +94,18 @@ func unmarshal(schema *ytypes.Schema, bytes []byte, path *gpb.Path, goStruct ygo
return &errors.ErrInvalidTypeAssertion{}
}
// returns the node we want to fill with the data contained in 'bytes', using
// the specified 'path'.
// returns the node we want to fill with the data contained in 'bytes',
// using the specified 'path'.
createdNode, _, err := ytypes.GetOrCreateNode(schema.RootSchema(), validatedDeepCopy, path)
if err != nil {
return err
}
fieldStruct, ok := createdNode.(ygot.ValidatedGoStruct)
validatedCreatedNode, ok := createdNode.(ygot.ValidatedGoStruct)
if !ok {
return &errors.ErrInvalidTypeAssertion{}
}
if err := openconfig.Unmarshal(bytes, fieldStruct, opt...); err != nil {
if err := openconfig.Unmarshal(bytes, validatedCreatedNode, opt...); err != nil {
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment