diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2021-11-19 18:22:06 +0100 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-11-27 17:24:42 +0000 |
commit | 403892147e940c0d1a23f964265d078385eb92e2 (patch) | |
tree | 48ba25296e11060e72682576ac3b873c4063cb21 /sdnr/wt/netconfnode-state-service/model/src/main | |
parent | 3e739d832853e821472facb181aa972ecfb45b1c (diff) |
Synchronize sdnr/wt data-provider, websocketmanager, netconfstate-provider
Synchronize sdnr/wt artifacts
Issue-ID: CCSDK-3530
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I6e6c25a03e12acf0bd666675aaeb5a8518ed7b1e
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/model/src/main')
-rw-r--r-- | sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java index f12c53a4d..133868fcf 100644 --- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java +++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java @@ -34,6 +34,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev15 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.available.capabilities.AvailableCapability; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.unavailable.capabilities.UnavailableCapability; import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.common.Revision; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -210,7 +211,10 @@ public class Capabilities { String namespace = qCapability.getNamespace().toString(); for (String capability : capabilities) { if (capability.contains(namespace)) { - return QName.create(capability).getRevision().get().toString(); + Optional<Revision> revisionOpt = QName.create(capability).getRevision(); + if (revisionOpt.isPresent()) { + return revisionOpt.get().toString(); + } } } return UNSUPPORTED; @@ -223,7 +227,7 @@ public class Capabilities { * @return true if namespace is supported. */ static public boolean isNamespaceSupported(String revision) { - return revision != UNSUPPORTED; + return !UNSUPPORTED.equals(revision); } @Override |