import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
import io.fd.honeycomb.translate.vpp.util.NamingContext;
-import io.fd.vpp.jvpp.VppBaseCallException;
import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
}
@Override
- public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final IngressBuilder builder,
+ public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id,
+ @Nonnull final IngressBuilder builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
LOG.debug("Reading attributes for interface ACL: {}", id);
final InterfaceKey interfaceKey = id.firstKeyOf(Interface.class);
final ClassifyTableByInterface request = new ClassifyTableByInterface();
request.swIfIndex = interfaceContext.getIndex(interfaceKey.getName(), ctx.getMappingContext());
- try {
- final ClassifyTableByInterfaceReply reply =
- getReplyForRead(getFutureJVpp().classifyTableByInterface(request).toCompletableFuture(), id);
- builder.setL2Acl(readL2Acl(reply.l2TableId, classifyTableContext, ctx.getMappingContext()));
- builder.setIp4Acl(readIp4Acl(reply.ip4TableId, classifyTableContext, ctx.getMappingContext()));
- builder.setIp6Acl(readIp6Acl(reply.ip6TableId, classifyTableContext, ctx.getMappingContext()));
+ final ClassifyTableByInterfaceReply reply =
+ getReplyForRead(getFutureJVpp().classifyTableByInterface(request).toCompletableFuture(), id);
- if (LOG.isTraceEnabled()) {
- LOG.trace("Attributes for ACL {} successfully read: {}", id, builder.build());
- }
- } catch (VppBaseCallException e) {
- throw new ReadFailedException(id, e);
+ builder.setL2Acl(readL2Acl(reply.l2TableId, classifyTableContext, ctx.getMappingContext()));
+ builder.setIp4Acl(readIp4Acl(reply.ip4TableId, classifyTableContext, ctx.getMappingContext()));
+ builder.setIp6Acl(readIp6Acl(reply.ip6TableId, classifyTableContext, ctx.getMappingContext()));
+
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Attributes for ACL {} successfully read: {}", id, builder.build());
}
}
}