summaryrefslogtreecommitdiffstats
path: root/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy')
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy20
1 files changed, 8 insertions, 12 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
index f8c9aaae3..f3ced2e3f 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
@@ -30,9 +30,7 @@ import io.fd.honeycomb.notification.impl.TranslationUtil
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamBuilder
import org.opendaylight.yangtools.yang.model.api.SchemaPath
-/**
- * Mirror of org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombNotificationToNetconfTranslatorModule
- */
+
@Slf4j
@ToString
class HoneycombNotification2NetconfProvider extends ProviderTrait<HoneycombNotification2Netconf> {
@@ -48,39 +46,37 @@ class HoneycombNotification2NetconfProvider extends ProviderTrait<HoneycombNotif
@Inject
NetconfNotificationCollector netconfNotificationCollector
- // TODO refactor HoneycombNotificationToNetconfTranslatorModule for easier reuse here
-
@Override
def create() {
def streamType = new StreamNameType(cfgAttributes.netconfNotificationStreamName.get());
- // Register as NETCONF notification publisher under configured name
+ // Register as HONEYCOMB_NETCONF notification publisher under configured name
def netconfNotifReg = netconfNotificationCollector.registerNotificationPublisher(new StreamBuilder()
.setName(streamType)
.setReplaySupport(false)
.setDescription(cfgAttributes.netconfNotificationStreamName.get()).build());
- // Notification Translator, get notification from HC producers and put into NETCONF notification collector
+ // Notification Translator, get notification from HC producers and put into HONEYCOMB_NETCONF notification collector
def domNotificationListener = { notif ->
- log.debug "Propagating notification: {} into NETCONF", notif.type
+ log.debug "Propagating notification: {} into HONEYCOMB_NETCONF", notif.type
netconfNotifReg.onNotification(streamType, TranslationUtil.notificationToXml(notif, schemaService.globalContext))
}
// NotificationManager is used to provide list of available notifications (which are all of the notifications registered)
- // TODO make available notifications configurable here so that any number of notification streams for NETCONF
+ // TODO make available notifications configurable here so that any number of notification streams for HONEYCOMB_NETCONF
// can be configured on top of a single notification manager
- log.debug "Current notifications to be exposed over NETCONF: {}", hcNotificationCollector.notificationTypes
+ log.debug "Current notifications to be exposed over HONEYCOMB_NETCONF: {}", hcNotificationCollector.notificationTypes
def currentNotificationSchemaPaths = hcNotificationCollector.notificationTypes
.collect {SchemaPath.create(true, NotificationProducerRegistry.getQName(it))}
// Register as listener to HC'OPERATIONAL DOM notification service
- // TODO This should only be triggered when NETCONF notifications are activated
+ // TODO This should only be triggered when HONEYCOMB_NETCONF notifications are activated
// Because this way we actually start all notification producers
// final Collection<QName> notificationQNames =
def domNotifListenerReg = notificationRouter
.registerNotificationListener(domNotificationListener, currentNotificationSchemaPaths);
- log.info "Exposing NETCONF notification stream: {}", streamType.value
+ log.info "Exposing HONEYCOMB_NETCONF notification stream: {}", streamType.value
new HoneycombNotification2Netconf(domNotifListenerReg: domNotifListenerReg, netconfNotifReg: netconfNotifReg)
}