From c5894b0fe3036763702003adc8421c2e715c90b6 Mon Sep 17 00:00:00 2001 From: Sagar Srivastav Date: Fri, 16 Dec 2016 00:42:48 -0800 Subject: ioam: add subtrees for pot-profile-list and node-interfaces to pot and trace customizers -updated postman collection Change-Id: Iebeebb1e12c52bf564e38b1cb65ce5425fc5fa22 Signed-off-by: Sagar Srivastav --- .../hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'ioam/impl') diff --git a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java index f4b2cea19..9d812467f 100755 --- a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java +++ b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java @@ -16,20 +16,22 @@ package io.fd.hc2vpp.vppioam.impl.config; +import com.google.common.collect.Sets; import com.google.inject.Inject; import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import io.fd.vpp.jvpp.ioampot.future.FutureJVppIoampot; import io.fd.vpp.jvpp.ioamtrace.future.FutureJVppIoamtrace; +import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.ioam.sb.trace.rev160512.IoamTraceConfig; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.ioam.sb.trace.rev160512.ioam.trace.config.TraceConfig; +import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.ioam.sb.trace.rev160512.ioam.trace.config.trace.config.NodeInterfaces; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev160615.PotProfiles; +import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev160615.pot.profile.PotProfileList; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev160615.pot.profiles.PotProfileSet; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - public class VppIoamWriterFactory implements WriterFactory { @Nonnull @@ -49,11 +51,15 @@ public class VppIoamWriterFactory implements WriterFactory { // Trace Config final InstanceIdentifier trId = InstanceIdentifier.create(IoamTraceConfig.class).child(TraceConfig.class); - registry.add(new GenericListWriter<>(trId, new IoamTraceWriterCustomizer(jVppIoamtrace))); + registry.subtreeAdd(Sets.newHashSet(InstanceIdentifier.create(TraceConfig.class) + .child(NodeInterfaces.class)), + new GenericListWriter<>(trId, new IoamTraceWriterCustomizer(jVppIoamtrace))); // POT Config final InstanceIdentifier potId = InstanceIdentifier.create(PotProfiles.class).child(PotProfileSet.class); - registry.add(new GenericListWriter<>(potId, new IoamPotWriterCustomizer(jVppIoampot))); + registry.subtreeAdd(Sets.newHashSet(InstanceIdentifier.create(PotProfileSet.class) + .child(PotProfileList.class)), + new GenericListWriter<>(potId, new IoamPotWriterCustomizer(jVppIoampot))); } } -- cgit 1.2.3-korg