summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-07-12 16:45:59 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-07-25 09:05:08 +0000
commit9e9cf0e506b3da8a101700401d3a1cebc1f27656 (patch)
treece9c3acef5f5b33bc71c38326cfa66658d01eadd
parentf15aed916c69b0766c7bed2dc7fe534f48b97ac9 (diff)
Remove interface type check from ethernet customzier
Change-Id: Iea27dac55312ad8c80380823b3f8a0d703e94011 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/EthernetCustomizer.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/EthernetCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/EthernetCustomizer.java
index 27081b1b2..94067fd6b 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/EthernetCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/EthernetCustomizer.java
@@ -16,18 +16,18 @@
package io.fd.honeycomb.v3po.translate.v3po.interfaces;
-import io.fd.honeycomb.v3po.translate.v3po.util.AbstractInterfaceTypeCustomizer;
+import io.fd.honeycomb.v3po.translate.spi.write.WriterCustomizer;
+import io.fd.honeycomb.v3po.translate.v3po.util.FutureJVppCustomizer;
import io.fd.honeycomb.v3po.translate.write.WriteContext;
+import io.fd.honeycomb.v3po.translate.write.WriteFailedException;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Ethernet;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.openvpp.jvpp.future.FutureJVpp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class EthernetCustomizer extends AbstractInterfaceTypeCustomizer<Ethernet> {
+public class EthernetCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Ethernet> {
private static final Logger LOG = LoggerFactory.getLogger(EthernetCustomizer.class);
@@ -36,13 +36,9 @@ public class EthernetCustomizer extends AbstractInterfaceTypeCustomizer<Ethernet
}
@Override
- protected Class<? extends InterfaceType> getExpectedInterfaceType() {
- return EthernetCsmacd.class;
- }
-
- @Override
- protected final void writeInterface(@Nonnull final InstanceIdentifier<Ethernet> id,
- @Nonnull final Ethernet dataAfter, @Nonnull final WriteContext writeContext) {
+ public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ethernet> id,
+ @Nonnull final Ethernet dataAfter, @Nonnull final WriteContext writeContext)
+ throws WriteFailedException {
// TODO
LOG.warn("Unsupported, ignoring configuration {}", dataAfter);
// VPP API does not support setting MTU