X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-topology%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2Fimpl%2FNetconfTopologyImpl.java;h=41e4ef62fd98a51e34934fb707e2e0cf9e8714ed;hb=e7abbe8b97f494030992ea8f9cc81a982695852b;hp=243f09a77f8e1a49837e686d7ce102f27a825096;hpb=e1bdc7d1eff9c117a0e3c4559f5e8a0595f53a3f;p=netconf.git diff --git a/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java b/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java index 243f09a77f..41e4ef62fd 100644 --- a/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java +++ b/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java @@ -13,6 +13,7 @@ import com.google.common.util.concurrent.Futures; import io.netty.util.concurrent.EventExecutor; import java.util.Collection; import javax.annotation.Nonnull; +import org.opendaylight.aaa.encrypt.AAAEncryptionService; import org.opendaylight.controller.config.threadpool.ScheduledThreadPool; import org.opendaylight.controller.config.threadpool.ThreadPool; import org.opendaylight.controller.md.sal.binding.api.DataBroker; @@ -42,7 +43,8 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class NetconfTopologyImpl extends AbstractNetconfTopology implements DataTreeChangeListener, AutoCloseable { +public class NetconfTopologyImpl extends AbstractNetconfTopology + implements DataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(NetconfTopologyImpl.class); @@ -50,10 +52,12 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology implements Data public NetconfTopologyImpl(final String topologyId, final NetconfClientDispatcher clientDispatcher, final EventExecutor eventExecutor, final ScheduledThreadPool keepaliveExecutor, - final ThreadPool processingExecutor, final SchemaRepositoryProvider schemaRepositoryProvider, - final DataBroker dataBroker, final DOMMountPointService mountPointService) { + final ThreadPool processingExecutor, + final SchemaRepositoryProvider schemaRepositoryProvider, + final DataBroker dataBroker, final DOMMountPointService mountPointService, + final AAAEncryptionService encryptionService) { super(topologyId, clientDispatcher, eventExecutor, keepaliveExecutor, processingExecutor, - schemaRepositoryProvider, dataBroker, mountPointService); + schemaRepositoryProvider, dataBroker, mountPointService, encryptionService); } @Override @@ -76,7 +80,7 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology implements Data } /** - * Invoke by blueprint + * Invoked by blueprint. */ public void init() { final WriteTransaction wtx = dataBroker.newWriteOnlyTransaction(); @@ -89,8 +93,8 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology implements Data } @Override - public void onFailure(final Throwable t) { - LOG.error("Unable to initialize netconf-topology, {}", t); + public void onFailure(final Throwable throwable) { + LOG.error("Unable to initialize netconf-topology, {}", throwable); } }); @@ -116,7 +120,8 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology implements Data case WRITE: LOG.debug("Config for node {} created", TopologyUtil.getNodeId(rootNode.getIdentifier())); if (activeConnectors.containsKey(TopologyUtil.getNodeId(rootNode.getIdentifier()))) { - LOG.warn("RemoteDevice{{}} was already configured, reconfiguring..", TopologyUtil.getNodeId(rootNode.getIdentifier())); + LOG.warn("RemoteDevice{{}} was already configured, reconfiguring..", + TopologyUtil.getNodeId(rootNode.getIdentifier())); disconnectNode(TopologyUtil.getNodeId(rootNode.getIdentifier())); } connectNode(TopologyUtil.getNodeId(rootNode.getIdentifier()), rootNode.getDataAfter()); @@ -125,16 +130,20 @@ public class NetconfTopologyImpl extends AbstractNetconfTopology implements Data LOG.debug("Config for node {} deleted", TopologyUtil.getNodeId(rootNode.getIdentifier())); disconnectNode(TopologyUtil.getNodeId(rootNode.getIdentifier())); break; + default: + LOG.debug("Unsupported modification type: {}.", rootNode.getModificationType()); } } } private void initTopology(final WriteTransaction wtx, final LogicalDatastoreType datastoreType) { final NetworkTopology networkTopology = new NetworkTopologyBuilder().build(); - final InstanceIdentifier networkTopologyId = InstanceIdentifier.builder(NetworkTopology.class).build(); + final InstanceIdentifier networkTopologyId = + InstanceIdentifier.builder(NetworkTopology.class).build(); wtx.merge(datastoreType, networkTopologyId, networkTopology); final Topology topology = new TopologyBuilder().setTopologyId(new TopologyId(topologyId)).build(); - wtx.merge(datastoreType, networkTopologyId.child(Topology.class, new TopologyKey(new TopologyId(topologyId))), topology); + wtx.merge(datastoreType, + networkTopologyId.child(Topology.class, new TopologyKey(new TopologyId(topologyId))), topology); } }