Support multiple schemas/module-sets by YangLibraryContentBuilder
Description
RESTCONF yang-library services are using different sources to generate different parts of same yang-library data node:
restconf-nb PUTs modules data belonging to global schema context, while yanglib collects information from custom directory then MERGEs modules data into existing data structure. Same node update by variety of services on different events it may cause data inconsistency (corruption).
Using different module-sets for different sources will allow safe override/delete module-set by key without a risk corrupting data associated with other source and/or synchronized by other component.
Currently YangLibraryContentBuilder supports only single module-set with predefined name (key). Enabling multiple multiple module-sets will resolve the issue described above.
Expected implementation like below
final var yangLibNode = yangLib.newContentBuilder()
.defaultContext(defaultContext)
.moduleSetName("custom")
.formatYangLibraryContent();
If custom module-set name is not defined then default one should be used.
RESTCONF yang-library services are using different sources to generate different parts of same yang-library data node:
restconf-nb PUTs modules data belonging to global schema context, while yanglib collects information from custom directory then MERGEs modules data into existing data structure. Same node update by variety of services on different events it may cause data inconsistency (corruption).
Using different module-sets for different sources will allow safe override/delete module-set by key without a risk corrupting data associated with other source and/or synchronized by other component.
Currently YangLibraryContentBuilder supports only single module-set with predefined name (key). Enabling multiple multiple module-sets will resolve the issue described above.
Expected implementation like below
final var yangLibNode = yangLib.newContentBuilder() .defaultContext(defaultContext) .moduleSetName("custom") .formatYangLibraryContent();
If custom module-set name is not defined then default one should be used.