import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataTreeModification;
import org.opendaylight.mdsal.dom.api.DOMDataBroker;
+import org.opendaylight.netconf.dom.api.NetconfDataTreeService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev190614.netconf.node.fields.optional.topology.node.DatastoreLock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(LockChangeListener.class);
private final NetconfDeviceDataBroker netconfDeviceDataBroker;
+ private final NetconfDataTreeServiceImpl netconfDataTreeService;
- LockChangeListener(final DOMDataBroker netconfDeviceDataBrokder) {
+ LockChangeListener(final DOMDataBroker netconfDeviceDataBrokder,
+ final NetconfDataTreeService netconfDataTreeService) {
this.netconfDeviceDataBroker = (NetconfDeviceDataBroker)netconfDeviceDataBrokder;
+ this.netconfDataTreeService = (NetconfDataTreeServiceImpl) netconfDataTreeService;
}
@Override
+ "the data store may interfere with data consistency.");
}
netconfDeviceDataBroker.setLockAllowed(rootNode.getDataAfter().isDatastoreLockAllowed());
+ netconfDataTreeService.setLockAllowed(rootNode.getDataAfter().isDatastoreLockAllowed());
break;
case DELETE:
netconfDeviceDataBroker.setLockAllowed(true);
+ netconfDataTreeService.setLockAllowed(true);
break;
default:
LOG.debug("Unsupported modification type: {}.", rootNode.getModificationType());