@Override public void put(LogicalDatastoreType logicalDatastoreType, YangInstanceIdentifier yangInstanceIdentifier, NormalizedNode<?, ?> normalizedNode) { if (AuthzServiceImpl.isAuthorized(logicalDatastoreType, yangInstanceIdentifier, ActionType.Put)) { domDataReadWriteTransaction.put(logicalDatastoreType, yangInstanceIdentifier, normalizedNode); } }
@Override public void put(final LogicalDatastoreType store, final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) { delegate().put(store, path, data); }
@Override public void put(final LogicalDatastoreType store, final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) { delegate().put(store, path, data); }
private CheckedFuture<Void, TransactionCommitFailedException> putDataViaTransaction( final DOMDataBroker domDataBroker, final LogicalDatastoreType datastore, final YangInstanceIdentifier path, final NormalizedNode<?, ?> payload, final SchemaContext schemaContext) { DOMDataReadWriteTransaction transaction = domDataBroker.newReadWriteTransaction(); LOG.trace("Put " + datastore.name() + " via Restconf: {} with payload {}", path, payload); if (!ensureParentsByMerge(datastore, path, transaction, schemaContext)) { transaction.cancel(); transaction = domDataBroker.newReadWriteTransaction(); } transaction.put(datastore, path, payload); return transaction.submit(); }
throw new NetconfDocumentedException("Data already exists, cannot execute CREATE operation", ErrorType.protocol, ErrorTag.data_exists, ErrorSeverity.error); rwtx.put(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.create(change.getPath()), change.getChangeRoot()); } catch (ReadFailedException e) { LOG.warn("Read from datastore failed when trying to read data for create operation", change, e); rwtx.put(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.create(change.getPath()), change.getChangeRoot()); break; case DELETE:
throw new DocumentedException("Data already exists, cannot execute CREATE operation", ErrorType.protocol, ErrorTag.data_exists, ErrorSeverity.error); rwtx.put(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.create(change.getPath()), change.getChangeRoot()); } catch (ReadFailedException e) { LOG.warn("Read from datastore failed when trying to read data for create operation", change, e); rwtx.put(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.create(change.getPath()), change.getChangeRoot()); break; case DELETE: