summaryrefslogtreecommitdiffstats
path: root/v3po/impl
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/impl')
-rw-r--r--v3po/impl/pom.xml5
-rw-r--r--v3po/impl/src/main/config/context-datatree-config.xml17
-rw-r--r--v3po/impl/src/main/config/default-config.xml4
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NorthboundFacadeHoneycombDOMBroker.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NetconfFacadeHoneycombBindingBroker.java)14
-rw-r--r--v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java5
-rw-r--r--v3po/impl/src/main/yang/v3po-impl.yang10
6 files changed, 49 insertions, 6 deletions
diff --git a/v3po/impl/pom.xml b/v3po/impl/pom.xml
index dc41c5b75..8632f74fe 100644
--- a/v3po/impl/pom.xml
+++ b/v3po/impl/pom.xml
@@ -36,6 +36,11 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>notification-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>translate-impl</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/v3po/impl/src/main/config/context-datatree-config.xml b/v3po/impl/src/main/config/context-datatree-config.xml
index a77813daf..02d2f61d4 100644
--- a/v3po/impl/src/main/config/context-datatree-config.xml
+++ b/v3po/impl/src/main/config/context-datatree-config.xml
@@ -109,6 +109,15 @@
</module>
<!-- END: Special reader for Context -->
+ <!-- Mapping context on top of BA context broker. Utilized by eg notification producers -->
+ <module>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:realtime-mapping-context</type>
+ <name>realtime-mapping-context</name>
+ <context-binding-broker>
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
+ <name>honeycomb-context-binding-data-broker</name>
+ </context-binding-broker>
+ </module>
</modules>
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
@@ -148,6 +157,14 @@
<provider>/modules/module[type='binding-forwarded-data-broker'][name='honeycomb-context-binding-data-broker']</provider>
</instance>
</service>
+
+ <service>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-mapping-context</type>
+ <instance>
+ <name>realtime-mapping-context</name>
+ <provider>/modules/module[type='realtime-mapping-context'][name='realtime-mapping-context']</provider>
+ </instance>
+ </service>
</services>
</data>
</configuration>
diff --git a/v3po/impl/src/main/config/default-config.xml b/v3po/impl/src/main/config/default-config.xml
index 2fe385631..00c586d12 100644
--- a/v3po/impl/src/main/config/default-config.xml
+++ b/v3po/impl/src/main/config/default-config.xml
@@ -161,6 +161,10 @@
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-async-data-broker</type>
<name>honeycomb-dom-data-broker</name>
</honeycomb-dom-data-broker>
+ <honeycomb-dom-notification-service>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:dom-notification-service</type>
+ <name>honeycomb-dom-notification-service</name>
+ </honeycomb-dom-notification-service>
</module>
</modules>
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NetconfFacadeHoneycombBindingBroker.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NorthboundFacadeHoneycombDOMBroker.java
index 9d70113e4..c2d70c38c 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NetconfFacadeHoneycombBindingBroker.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/NorthboundFacadeHoneycombDOMBroker.java
@@ -27,6 +27,8 @@ import javax.annotation.concurrent.NotThreadSafe;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
+import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
+import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcAvailabilityListener;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementationNotAvailableException;
@@ -45,23 +47,27 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.osgi.framework.BundleContext;
/**
- * Implementation of dom broker to facade VPP pipeline for netconf northbound server
+ * Implementation of dom broker to facade VPP pipeline for northbound APIs
*/
-public class NetconfFacadeHoneycombBindingBroker implements AutoCloseable, Broker {
+public class NorthboundFacadeHoneycombDOMBroker implements AutoCloseable, Broker {
private static final BrokerService EMPTY_DOM_RPC_SERVICE = new EmptyDomRpcService();
private static final BrokerService EMPTY_DOM_MOUNT_SERVICE = new EmptyDomMountService();
private Map<Class<? extends BrokerService>, BrokerService> services;
- public NetconfFacadeHoneycombBindingBroker(@Nonnull final DOMDataBroker domDataBrokerDependency,
- @Nonnull final SchemaService schemaBiService) {
+ public NorthboundFacadeHoneycombDOMBroker(@Nonnull final DOMDataBroker domDataBrokerDependency,
+ @Nonnull final SchemaService schemaBiService,
+ @Nonnull final DOMNotificationService domNotificatioNService) {
services = Maps.newHashMap();
services.put(DOMDataBroker.class, domDataBrokerDependency);
// All services below are required to be present by Restconf northbound
services.put(SchemaService.class, schemaBiService);
services.put(DOMRpcService.class, EMPTY_DOM_RPC_SERVICE);
services.put(DOMMountPointService.class, EMPTY_DOM_MOUNT_SERVICE);
+ services.put(DOMNotificationService.class, domNotificatioNService);
+ // TODO do both notification service types have to be registered ?
+ services.put(DOMNotificationPublishService.class, domNotificatioNService);
}
@Override
diff --git a/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java b/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java
index b22ece04f..caa792da4 100644
--- a/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java
+++ b/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java
@@ -16,7 +16,7 @@
package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210;
-import io.fd.honeycomb.v3po.impl.NetconfFacadeHoneycombBindingBroker;
+import io.fd.honeycomb.v3po.impl.NorthboundFacadeHoneycombDOMBroker;
import org.opendaylight.controller.sal.core.api.AbstractProvider;
import org.opendaylight.controller.sal.core.api.Broker;
import org.opendaylight.controller.sal.core.api.model.SchemaService;
@@ -53,7 +53,8 @@ public class V3poModule extends
});
final SchemaService schemaBiService = providerSession.getService(SchemaService.class);
- return new NetconfFacadeHoneycombBindingBroker(getHoneycombDomDataBrokerDependency(), schemaBiService);
+ return new NorthboundFacadeHoneycombDOMBroker(getHoneycombDomDataBrokerDependency(), schemaBiService,
+ getHoneycombDomNotificationServiceDependency());
}
}
diff --git a/v3po/impl/src/main/yang/v3po-impl.yang b/v3po/impl/src/main/yang/v3po-impl.yang
index 3ab69f4e9..40b00ec96 100644
--- a/v3po/impl/src/main/yang/v3po-impl.yang
+++ b/v3po/impl/src/main/yang/v3po-impl.yang
@@ -9,6 +9,7 @@ module v3po-impl {
import vpp-jvpp-cfg { prefix vjvppc; revision-date 2016-04-06; }
import translate-api { prefix tapi; revision-date 2016-04-06; }
import data-api { prefix dapi; revision-date 2016-04-11; }
+ import notification-api { prefix hc-notif-a; revision-date 2016-06-01; }
description
"Service definition for v3po project";
@@ -45,6 +46,15 @@ module v3po-impl {
}
}
+ container honeycomb-dom-notification-service {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity hc-notif-a:dom-notification-service;
+ }
+ }
+ }
+
}
}