summaryrefslogtreecommitdiffstats
path: root/vpp-classifier
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-03-21 12:39:36 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-03-21 12:41:07 +0100
commit95d18b91f26cae876bec3e946ee1f390007137eb (patch)
tree394d29aaf2aa845a2556ea56e419978a4d6144e0 /vpp-classifier
parent7e94e59b8f9469cc33546f5512851bfca091c0e9 (diff)
HC2VPP-117: workaround for VPP-208
Change-Id: I75d05fc73236f7a768f54d29247054cc20b722a6 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-classifier')
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java1
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java5
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java6
3 files changed, 9 insertions, 3 deletions
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
index 9d4c40f50..faf34678b 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
@@ -122,7 +122,6 @@ final class PolicerCustomizer extends FutureJVppCustomizer
builder.setName(toString(details.name));
builder.setCir(UnsignedInts.toLong(details.cir));
builder.setEir(UnsignedInts.toLong(details.eir));
- // TODO(HC2VPP-117): policer init fails if cb is configured (looks like byte ordering issue on VPP side)
builder.setCb(toUnsignedBigInteger(details.cb));
builder.setEb(toUnsignedBigInteger(details.eb));
builder.setRateType(PolicerRateType.forValue(details.rateType));
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
index a88620b35..cfa2ae068 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
@@ -79,7 +79,10 @@ public class ClassifyTableWriter extends VppNodeWriter
public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<ClassifyTable> id,
@Nonnull final ClassifyTable dataBefore, @Nonnull final ClassifyTable dataAfter,
@Nonnull final WriteContext writeContext) throws WriteFailedException {
- throw new UnsupportedOperationException("Classify table update is not supported");
+ // TODO(HC2VPP-10): memory_size is not part of classify table dump, so initialization triggers update,
+ // uncomment after VPP-208 is fixed
+ // throw new UnsupportedOperationException("Classify table update is not supported");
+ LOG.error("Classify table update is not supported, ignoring config");
}
@Override
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
index 2a8b3db66..0b156a333 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.fail;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
@@ -173,10 +174,13 @@ public class ClassifyTableWriterTest extends WriterCustomizerTest {
customizer.deleteCurrentAttributes(id, classifyTable, writeContext);
}
- @Test(expected = UnsupportedOperationException.class)
+ @Test
+ // TODO: uncomment after HC2VPP-10 is fixed
+ // (expected = UnsupportedOperationException.class)
public void testUpdate() throws Exception {
final ClassifyTable classifyTableBefore = generateClassifyTable(TABLE_NAME);
final InstanceIdentifier<ClassifyTable> id = getClassifyTableId(TABLE_NAME);
customizer.updateCurrentAttributes(id, classifyTableBefore, new ClassifyTableBuilder().build(), writeContext);
+ verifyZeroInteractions(api);
}
} \ No newline at end of file