X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fosgi%2FNetconfOperationRouterImpl.java;h=d70a15c18bdf933d56df70d7f7e9be07df6653da;hp=11b8dc623c8a07903df1d05da46407aef1770a47;hb=6a0a63249f5e6b9b21569e4610c292567e315176;hpb=24feaa3333de6eadfc99a63cce0f95479e3b5f96 diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java index 11b8dc623c..d70a15c18b 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java @@ -10,9 +10,9 @@ package org.opendaylight.controller.netconf.impl.osgi; import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import com.google.common.collect.Sets; +import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.api.NetconfOperationRouter; -import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.impl.DefaultCommitNotificationProducer; import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider; import org.opendaylight.controller.netconf.impl.mapping.operations.DefaultCloseSession; @@ -53,8 +53,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { public NetconfOperationRouterImpl(NetconfOperationServiceSnapshot netconfOperationServiceSnapshot, - CapabilityProvider capabilityProvider, - DefaultCommitNotificationProducer commitNotifier) { + CapabilityProvider capabilityProvider, DefaultCommitNotificationProducer commitNotifier) { this.netconfOperationServiceSnapshot = netconfOperationServiceSnapshot; @@ -65,12 +64,10 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { .getNetconfSessionIdForReporting())); defaultNetconfOperations.add(new DefaultCloseSession(netconfOperationServiceSnapshot .getNetconfSessionIdForReporting())); - defaultNetconfOperations.add(new DefaultStartExi( - netconfOperationServiceSnapshot - .getNetconfSessionIdForReporting())); - defaultNetconfOperations.add(new DefaultStopExi( - netconfOperationServiceSnapshot - .getNetconfSessionIdForReporting())); + defaultNetconfOperations.add(new DefaultStartExi(netconfOperationServiceSnapshot + .getNetconfSessionIdForReporting())); + defaultNetconfOperations.add(new DefaultStopExi(netconfOperationServiceSnapshot + .getNetconfSessionIdForReporting())); allNetconfOperations = getAllNetconfOperations(defaultNetconfOperations, netconfOperationServiceSnapshot); @@ -102,7 +99,8 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { for (NetconfOperationService netconfOperationService : netconfOperationServiceSnapshot.getServices()) { final Set filtersFromService = netconfOperationService.getFilters(); for (NetconfOperationFilter filter : filtersFromService) { - Preconditions.checkState(result.contains(filter) == false, "Filter %s already present", filter); + Preconditions.checkState(result.contains(filter) == false, + "Filter %s already present, all filters so far: %s", filter, result); result.add(filter); } } @@ -116,7 +114,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { @Override public synchronized Document onNetconfMessage(Document message, NetconfSession session) throws NetconfDocumentedException { - NetconfOperationExecution netconfOperationExecution = null; + NetconfOperationExecution netconfOperationExecution; String messageAsString = XmlUtil.toString(message); @@ -187,7 +185,6 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { private NetconfOperationExecution getNetconfOperationWithHighestPriority( Document message, NetconfSession session) { - // TODO test TreeMap> sortedPriority = getSortedNetconfOperationsWithCanHandle( message, session);