summaryrefslogtreecommitdiffstats
path: root/infra/northbound/bgp-extensions/inet/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'infra/northbound/bgp-extensions/inet/src/main/java')
-rw-r--r--infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java
index de61c8dfe..cc7064c79 100644
--- a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java
+++ b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java
@@ -16,7 +16,6 @@
package io.fd.honeycomb.northbound.bgp.extension;
-import com.google.common.collect.Sets;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.honeycomb.translate.util.write.BindingBrokerWriter;
@@ -24,11 +23,7 @@ import io.fd.honeycomb.translate.write.WriterFactory;
import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.ipv4.routes.Ipv4Routes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.ipv4.routes.ipv4.routes.Ipv4Route;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.attributes.LocalPref;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.attributes.Origin;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.ipv6.routes.Ipv6Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import javax.annotation.Nonnull;
@@ -38,6 +33,8 @@ import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModul
public class InetWriterFactory implements WriterFactory {
private static final InstanceIdentifier<Ipv4Routes> IPV4_ROUTES_IID = TABLES_IID.child((Class) Ipv4Routes.class);
+ private static final InstanceIdentifier<Ipv4Routes> IPV6_ROUTES_IID = TABLES_IID.child((Class) Ipv6Routes.class);
+
@Inject
@Named("honeycomb-bgp")
@@ -45,17 +42,7 @@ public class InetWriterFactory implements WriterFactory {
@Override
public void init(@Nonnull ModifiableWriterRegistryBuilder registry) {
- final InstanceIdentifier<Ipv4Routes> subtreeIid = InstanceIdentifier.create(Ipv4Routes.class);
-
- //TODO - HONEYCOMB-359 - use wildcarded subtree writer
- registry.subtreeAdd(
- Sets.newHashSet(
- subtreeIid.child(Ipv4Route.class),
- subtreeIid.child(Ipv4Route.class).child(Attributes.class),
- subtreeIid.child(Ipv4Route.class).child(Attributes.class).child(Origin.class),
- subtreeIid.child(Ipv4Route.class).child(Attributes.class).child(LocalPref.class),
- subtreeIid.child(Ipv4Route.class).child(Attributes.class).child(Ipv4NextHop.class)),
- new BindingBrokerWriter<>(IPV4_ROUTES_IID, dataBroker)
- );
+ registry.wildcardedSubtreeAdd(new BindingBrokerWriter<>(IPV4_ROUTES_IID, dataBroker));
+ registry.wildcardedSubtreeAdd(new BindingBrokerWriter<>(IPV6_ROUTES_IID, dataBroker));
}
}