import static org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfStreamsConstants.STREAM_PATH_PART;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.MoreExecutors;
import java.net.URI;
import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.Revision;
-import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
}
final DOMMountPoint mountPoint = context.getMountPoint();
- final Absolute schemaPath = Absolute.of(ImmutableList.copyOf(context.getSchemaNode().getPath()
- .getPathFromRoot()));
+ final Absolute schemaPath = context.inference().toSchemaInferenceStack().toSchemaNodeIdentifier();
final DOMActionResult response;
if (mountPoint != null) {
response = invokeAction((ContainerNode) data, schemaPath, yangIIdContext, mountPoint);
return RestconfInvokeOperationsServiceImpl.checkedGet(Futures.catching(actionService.invokeAction(
schemaPath, new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, yangIId.getParent()), data),
DOMActionException.class,
- cause -> new SimpleDOMActionResult(ImmutableList.of(RpcResultBuilder.newError(
- RpcError.ErrorType.RPC, "operation-failed", cause.getMessage()))),
+ cause -> new SimpleDOMActionResult(List.of(RpcResultBuilder.newError(
+ ErrorType.RPC, ErrorTag.OPERATION_FAILED, cause.getMessage()))),
MoreExecutors.directExecutor()));
}