Skip to content
Snippets Groups Projects

Enable export and import of SDN configuration

Merged Ghost User requested to merge export-import-sdn-config into develop
1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
@@ -2,6 +2,7 @@ package nucleus
import (
"encoding/json"
"fmt"
"path/filepath"
"code.fbi.h-da.de/danet/gosdn/controller/customerrs"
@@ -161,6 +162,18 @@ func unmarshal(schema *ytypes.Schema, bytes []byte, path *gpb.Path, goStruct ygo
return err
}
entry := schema.RootSchema()
readOnlyPaths := make([]string, 0)
for _, subEntry := range entry.Dir {
if !subEntry.IsDir() {
readOnlyPaths = append(readOnlyPaths, subEntry.Path())
}
}
fmt.Println(readOnlyPaths)
opts := []ygot.MergeOpt{&ygot.MergeOverwriteExistingFields{}}
return ygot.MergeStructInto(goStruct, validatedDeepCopy, opts...)
}
Loading