This flips the switch on enforcement of mandatory nodes in operational
data trees by default.
Change-Id: Id9c44d119a324ea711c36cea9a87728d0cbcc3ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
public class DataTreeConfiguration implements Immutable {
public static final DataTreeConfiguration DEFAULT_CONFIGURATION = new Builder(TreeType.CONFIGURATION)
.setMandatoryNodesValidation(true).build();
- public static final DataTreeConfiguration DEFAULT_OPERATIONAL = new Builder(TreeType.OPERATIONAL).build();
+ public static final DataTreeConfiguration DEFAULT_OPERATIONAL = new Builder(TreeType.OPERATIONAL)
+ .setMandatoryNodesValidation(true).build();
private final TreeType treeType;
private final YangInstanceIdentifier rootPath;
dataTreeConfiguration = DataTreeConfiguration.getDefault(TreeType.OPERATIONAL);
assertEquals(TreeType.OPERATIONAL, dataTreeConfiguration.getTreeType());
assertFalse(dataTreeConfiguration.isUniqueIndexEnabled());
- assertFalse(dataTreeConfiguration.isMandatoryNodesValidationEnabled());
+ assertTrue(dataTreeConfiguration.isMandatoryNodesValidationEnabled());
}
}