X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2Fsal%2Ftx%2FNetconfDeviceReadOnlyTx.java;h=3248453baf498f372715696aaf749c509005345d;hp=142ee4484b9685162f60aa885636af294c12920c;hb=de3e413b633b7555ae8f3fe2ec163dbb7dda5da8;hpb=b35aa25e0c3a91fc71e778d9c9393e91036246e3 diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/tx/NetconfDeviceReadOnlyTx.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/tx/NetconfDeviceReadOnlyTx.java index 142ee4484b..3248453baf 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/tx/NetconfDeviceReadOnlyTx.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/tx/NetconfDeviceReadOnlyTx.java @@ -25,7 +25,7 @@ import org.opendaylight.controller.sal.connect.netconf.util.NetconfMessageTransf import org.opendaylight.controller.sal.core.api.RpcImplementation; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.Node; import org.opendaylight.yangtools.yang.data.api.SimpleNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -44,7 +44,7 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction this.normalizer = normalizer; } - public ListenableFuture>> readConfigurationData(final InstanceIdentifier path) { + public ListenableFuture>> readConfigurationData(final YangInstanceIdentifier path) { final ListenableFuture> future = rpc.invokeRpc(NETCONF_GET_CONFIG_QNAME, NetconfMessageTransformUtil.wrap(NETCONF_GET_CONFIG_QNAME, CONFIG_SOURCE_RUNNING, toFilterStructure(path))); @@ -61,7 +61,7 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction }); } - private Optional> transform(final InstanceIdentifier path, final CompositeNode node) { + private Optional> transform(final YangInstanceIdentifier path, final CompositeNode node) { if(node == null) { return Optional.absent(); } @@ -73,7 +73,7 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction } } - public ListenableFuture>> readOperationalData(final InstanceIdentifier path) { + public ListenableFuture>> readOperationalData(final YangInstanceIdentifier path) { final ListenableFuture> future = rpc.invokeRpc(NETCONF_GET_QNAME, NetconfMessageTransformUtil.wrap(NETCONF_GET_QNAME, toFilterStructure(path))); return Futures.transform(future, new Function, Optional>>() { @@ -89,10 +89,10 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction }); } - private static Node findNode(final CompositeNode node, final InstanceIdentifier identifier) { + private static Node findNode(final CompositeNode node, final YangInstanceIdentifier identifier) { Node current = node; - for (final InstanceIdentifier.PathArgument arg : identifier.getPathArguments()) { + for (final YangInstanceIdentifier.PathArgument arg : identifier.getPathArguments()) { if (current instanceof SimpleNode) { return null; } else if (current instanceof CompositeNode) { @@ -122,8 +122,8 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction } @Override - public ListenableFuture>> read(final LogicalDatastoreType store, final InstanceIdentifier path) { - final InstanceIdentifier legacyPath = toLegacyPath(normalizer, path); + public ListenableFuture>> read(final LogicalDatastoreType store, final YangInstanceIdentifier path) { + final YangInstanceIdentifier legacyPath = toLegacyPath(normalizer, path); switch (store) { case CONFIGURATION : { @@ -137,7 +137,7 @@ public final class NetconfDeviceReadOnlyTx implements DOMDataReadOnlyTransaction throw new IllegalArgumentException(String.format("Cannot read data %s for %s datastore, unknown datastore type", path, store)); } - static InstanceIdentifier toLegacyPath(final DataNormalizer normalizer, final InstanceIdentifier path) { + static YangInstanceIdentifier toLegacyPath(final DataNormalizer normalizer, final YangInstanceIdentifier path) { try { return normalizer.toLegacy(path); } catch (final DataNormalizationException e) {