diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2017-07-11 17:56:04 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-07-14 12:20:49 +0000 |
commit | 7d22608d89d8ff8c32e72d15039f1f27b7d659a8 (patch) | |
tree | a189335e86d6321b3fd3ba708f3c686ef1b2c566 /infra/minimal-distribution | |
parent | b65cd89989ead7082089bf6f333e56b03f619606 (diff) |
HONEYCOMB-360 - Netconf Northbound Intefaces provider separation
- Netconf configuration included under netconf.json
Change-Id: If2a51d689e9bfc950da73f15a438277839140f8a
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'infra/minimal-distribution')
-rw-r--r-- | infra/minimal-distribution/pom.xml | 9 | ||||
-rw-r--r-- | infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java | 31 |
2 files changed, 7 insertions, 33 deletions
diff --git a/infra/minimal-distribution/pom.xml b/infra/minimal-distribution/pom.xml index 5278c29e1..d8d1fc3e4 100644 --- a/infra/minimal-distribution/pom.xml +++ b/infra/minimal-distribution/pom.xml @@ -37,8 +37,8 @@ io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule, io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule, io.fd.honeycomb.northbound.CredentialsModule, - io.fd.honeycomb.infra.distro.netconf.NetconfModule, - io.fd.honeycomb.infra.distro.netconf.NetconfReadersModule, + io.fd.honeycomb.northbound.netconf.NetconfModule, + io.fd.honeycomb.northbound.netconf.NetconfReadersModule, io.fd.honeycomb.northbound.restconf.RestconfModule, io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule, // io.fd.honeycomb.infra.bgp.BgpModule, @@ -75,6 +75,11 @@ </dependency> <dependency> <groupId>io.fd.honeycomb.northbound</groupId> + <artifactId>netconf</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>io.fd.honeycomb.northbound</groupId> <artifactId>bgp</artifactId> <version>${project.version}</version> </dependency> diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java index 165227f21..359667f25 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java @@ -30,13 +30,7 @@ import io.fd.honeycomb.data.init.DataTreeInitializer; import io.fd.honeycomb.data.init.InitializerRegistry; import io.fd.honeycomb.infra.distro.activation.ActivationModule; import io.fd.honeycomb.infra.distro.activation.ActiveModules; -import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule; -import io.fd.honeycomb.infra.distro.netconf.HoneycombNotification2NetconfProvider; -import io.fd.honeycomb.infra.distro.netconf.NetconfModule; -import io.fd.honeycomb.infra.distro.netconf.NetconfSshServerProvider; -import io.fd.honeycomb.infra.distro.netconf.NetconfTcpServerProvider; -import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,35 +58,10 @@ public final class Main { .addAll(createInjector(activationModule).getInstance(ActiveModules.class).createModuleInstances()) .build()); - LOG.info("Honeycomb configuration: {}", injector.getInstance(HoneycombConfiguration.class)); - // Log all bindings injector.getAllBindings().entrySet().stream() .forEach(e -> LOG.trace("Component available under: {} is {}", e.getKey(), e.getValue())); - final HoneycombConfiguration cfgAttributes = injector.getInstance(HoneycombConfiguration.class); - - if (cfgAttributes.isNetconfEnabled()) { - LOG.info("Starting HONEYCOMB_NETCONF"); - injector.getInstance(Key.get(NetconfOperationServiceFactory.class, - Names.named(NetconfModule.HONEYCOMB_NETCONF_MAPPER_CORE))); - injector.getInstance(Key.get(NetconfOperationServiceFactory.class, - Names.named(NetconfModule.HONEYCOMB_NETCONF_MAPPER_NOTIF))); - injector.getInstance(Key.get(NetconfOperationServiceFactory.class, - Names.named(NetconfModule.HONEYCOMB_NETCONF_MAPPER_OPER))); - - if (cfgAttributes.isNetconfTcpEnabled()) { - LOG.info("Starting HONEYCOMB_NETCONF TCP"); - injector.getInstance(NetconfTcpServerProvider.NetconfTcpServer.class); - } - - if (cfgAttributes.isNetconfSshEnabled()) { - LOG.info("Starting HONEYCOMB_NETCONF SSH"); - injector.getInstance(NetconfSshServerProvider.NetconfSshServer.class); - } - injector.getInstance(HoneycombNotification2NetconfProvider.HoneycombNotification2Netconf.class); - } - try { LOG.info("Initializing configuration"); injector.getInstance(Key.get(InitializerRegistry.class, |