+ private static Optional<? extends NormalizedNode<?, ?>> findSchemasNode(final NormalizedNode<?, ?> result) {
+ if (result == null) {
+ return Optional.empty();
+ }
+ final Optional<DataContainerChild<?, ?>> dataNode = ((DataContainerNode<?>) result)
+ .getChild(NETCONF_DATA_NODEID);
+ if (!dataNode.isPresent()) {
+ return Optional.empty();
+ }
+
+ final Optional<DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?>> nStateNode =
+ ((DataContainerNode<?>) dataNode.get()).getChild(toId(NetconfState.QNAME));
+ if (!nStateNode.isPresent()) {
+ return Optional.empty();
+ }
+
+ return ((DataContainerNode<?>) nStateNode.get()).getChild(toId(Schemas.QNAME));
+ }
+
+ public static final class RemoteYangSchema {