+ def commitConfigurationDataPostBehindMountPoint(MountInstance mountPoint, InstanceIdentifier path, CompositeNode payload) {
+ checkPreconditions
+ val transaction = mountPoint.beginTransaction;
+ transaction.putConfigurationData(path, payload);
+ if (payload == transaction.createdConfigurationData.get(path)) {
+ LOG.trace("Post Configuration via Restconf: {}", path)
+ return transaction.commit
+ }
+ LOG.trace("Post Configuration via Restconf was not executed because data already exists: {}", path)
+ return null;
+ }
+
+ def commitConfigurationDataDelete(InstanceIdentifier path) {
+ checkPreconditions
+ val transaction = dataService.beginTransaction;
+ LOG.info("Delete Configuration via Restconf: {}", path)
+ transaction.removeConfigurationData(path)
+ return transaction.commit
+ }
+
+ def commitConfigurationDataDeleteBehindMountPoint(MountInstance mountPoint, InstanceIdentifier path) {
+ checkPreconditions
+ val transaction = mountPoint.beginTransaction;
+ LOG.info("Delete Configuration via Restconf: {}", path)
+ transaction.removeConfigurationData(path)
+ return transaction.commit
+ }
+
+ def registerToListenDataChanges(ListenerAdapter listener) {
+ checkPreconditions
+ if (listener.listening) {
+ return;
+ }
+ val registration = dataService.registerDataChangeListener(listener.path, listener)
+ listener.setRegistration(registration)
+ }
+