summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-09-20 08:58:39 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-09-20 11:08:36 +0000
commitbb4a84ef51334992b56944d16f0be33ec5a4a056 (patch)
treef38c058d158d0c21197e47c46ad790d1b79d6447 /v3po/v3po2vpp/src/main
parent5904d4b0693011f3b13c4b5bc21c93c4dcca4abd (diff)
Fix ietf-acl delete
Cancels classify tables assignment for interface before classify table removal. Change-Id: I8f1ec1f43dac89f64af306f02786166f713743f8 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
index 9c1098286..3f75d6729 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
@@ -97,8 +97,11 @@ public final class IetfAClWriter {
final CompletionStage<ClassifyTableByInterfaceReply> cs = jvpp.classifyTableByInterface(request);
final ClassifyTableByInterfaceReply reply = TranslateUtils.getReplyForWrite(cs.toCompletableFuture(), id);
- // We remove all ACL-related classify tables for given interface (we assume we are the only classify table
- // manager)
+ // We unassign and remove all ACL-related classify tables for given interface (we assume we are the only
+ // classify table manager)
+
+ unassignClassifyTables(id, reply);
+
removeClassifyTable(id, reply.l2TableId);
removeClassifyTable(id, reply.ip4TableId);
removeClassifyTable(id, reply.ip6TableId);
@@ -107,6 +110,20 @@ public final class IetfAClWriter {
}
}
+ private void unassignClassifyTables(@Nonnull final InstanceIdentifier<?> id,
+ final ClassifyTableByInterfaceReply currentState)
+ throws VppBaseCallException, WriteTimeoutException {
+ final InputAclSetInterface request = new InputAclSetInterface();
+ request.isAdd = 0;
+ request.swIfIndex = currentState.swIfIndex;
+ request.l2TableIndex = currentState.l2TableId;
+ request.ip4TableIndex = currentState.ip4TableId;
+ request.ip6TableIndex = currentState.ip6TableId;
+ final CompletionStage<InputAclSetInterfaceReply> inputAclSetInterfaceReplyCompletionStage =
+ jvpp.inputAclSetInterface(request);
+ TranslateUtils.getReplyForWrite(inputAclSetInterfaceReplyCompletionStage.toCompletableFuture(), id);
+ }
+
private void removeClassifyTable(@Nonnull final InstanceIdentifier<?> id, final int tableIndex)
throws VppBaseCallException, WriteTimeoutException {