summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-08-15 11:30:28 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-08-16 08:18:47 +0000
commitb8cf23cd61c2d3f57f9450570236534bce69232e (patch)
tree1840014acfe504fb58f81787e1ed52841453631f /v3po/v3po2vpp/src/main
parent3a7a67fe142749eb6b41f660d101f3fdffb8b3de (diff)
HONEYCOMB-386 - Hc2vpp Customizers update
Utilizes new default update implementation Change-Id: I9bf8473336274ba5fcfc18804f7b414937b3708e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java8
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java8
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java32
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java11
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java9
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java8
8 files changed, 13 insertions, 77 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
index bad859176..5208849c9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
@@ -75,14 +75,6 @@ public class GreCustomizer extends AbstractInterfaceTypeCustomizer<Gre> implemen
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Gre> id, @Nonnull final Gre dataBefore,
- @Nonnull final Gre dataAfter, @Nonnull final WriteContext writeContext)
- throws WriteFailedException.UpdateFailedException {
- throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter,
- new UnsupportedOperationException("Gre tunnel update is not supported"));
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Gre> id, @Nonnull final Gre dataBefore,
@Nonnull final WriteContext writeContext)
throws WriteFailedException {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java
index 00656a1bf..583f02392 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java
@@ -16,16 +16,16 @@
package io.fd.hc2vpp.v3po.interfaces;
-import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.interfaces._interface.L2;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java
index 6f3cda7eb..f0333004c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java
@@ -59,14 +59,6 @@ public final class LoopbackCustomizer extends AbstractInterfaceTypeCustomizer<Lo
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Loopback> id, @Nonnull final Loopback dataBefore,
- @Nonnull final Loopback dataAfter, @Nonnull final WriteContext writeContext)
- throws WriteFailedException {
- throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter,
- new UnsupportedOperationException("Modification of loopback interface is not supported"));
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Loopback> id, @Nonnull final Loopback dataBefore,
@Nonnull final WriteContext writeContext)
throws WriteFailedException {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
index 068796e38..f21b0198f 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
@@ -18,11 +18,19 @@ package io.fd.hc2vpp.v3po.interfaces;
import static com.google.common.base.Preconditions.checkArgument;
+import com.google.common.net.InetAddresses;
+import io.fd.hc2vpp.common.translate.util.AbstractInterfaceTypeCustomizer;
+import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
+import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
+import io.fd.honeycomb.translate.write.WriteContext;
+import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnel;
+import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.net.InetAddress;
import java.util.concurrent.CompletionStage;
-
import javax.annotation.Nonnull;
-
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
@@ -34,18 +42,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.net.InetAddresses;
-
-import io.fd.hc2vpp.common.translate.util.AbstractInterfaceTypeCustomizer;
-import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
-import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
-import io.fd.honeycomb.translate.write.WriteContext;
-import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnel;
-import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-
public class VxlanCustomizer extends AbstractInterfaceTypeCustomizer<Vxlan> implements JvppReplyConsumer {
private static final Logger LOG = LoggerFactory.getLogger(VxlanCustomizer.class);
@@ -75,14 +71,6 @@ public class VxlanCustomizer extends AbstractInterfaceTypeCustomizer<Vxlan> impl
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Vxlan> id, @Nonnull final Vxlan dataBefore,
- @Nonnull final Vxlan dataAfter, @Nonnull final WriteContext writeContext)
- throws WriteFailedException.UpdateFailedException {
- throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter,
- new UnsupportedOperationException("Vxlan tunnel update is not supported"));
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Vxlan> id, @Nonnull final Vxlan dataBefore,
@Nonnull final WriteContext writeContext)
throws WriteFailedException {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
index 80b666732..1cf4d7bd3 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
@@ -19,10 +19,10 @@ package io.fd.hc2vpp.v3po.interfaces;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.net.InetAddresses;
-import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
import io.fd.hc2vpp.common.translate.util.AbstractInterfaceTypeCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.VxlanGpeAddDelTunnel;
@@ -69,15 +69,6 @@ public class VxlanGpeCustomizer extends AbstractInterfaceTypeCustomizer<VxlanGpe
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<VxlanGpe> id,
- @Nonnull final VxlanGpe dataBefore,
- @Nonnull final VxlanGpe dataAfter, @Nonnull final WriteContext writeContext)
- throws WriteFailedException.UpdateFailedException {
- throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter,
- new UnsupportedOperationException("VxlanGpe tunnel update is not supported"));
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<VxlanGpe> id,
@Nonnull final VxlanGpe dataBefore,
@Nonnull final WriteContext writeContext)
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java
index 15d51a830..66ffa7f50 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java
@@ -78,16 +78,6 @@ public final class MirroredInterfaceCustomizer extends FutureJVppCustomizer
sourceInterfaceName, destinationInterfaceName, spanState);
}
-
- @Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<MirroredInterface> instanceIdentifier,
- @Nonnull final MirroredInterface mirroredInterfaceBefore,
- @Nonnull final MirroredInterface mirroredInterfaceAfter,
- @Nonnull final WriteContext writeContext) throws WriteFailedException {
- deleteCurrentAttributes(instanceIdentifier, mirroredInterfaceBefore, writeContext);
- writeCurrentAttributes(instanceIdentifier, mirroredInterfaceAfter, writeContext);
- }
-
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<MirroredInterface> id,
@Nonnull final MirroredInterface mirroredInterface,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
index b97885fd2..002899649 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
@@ -67,15 +67,6 @@ public class ArpTerminationTableEntryCustomizer extends FutureJVppCustomizer
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<ArpTerminationTableEntry> id,
- @Nonnull final ArpTerminationTableEntry dataBefore,
- @Nonnull final ArpTerminationTableEntry dataAfter,
- @Nonnull final WriteContext writeContext) throws WriteFailedException {
- throw new UnsupportedOperationException(
- "ARP termination table entry update is not supported. It has to be deleted and then created.");
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<ArpTerminationTableEntry> id,
@Nonnull final ArpTerminationTableEntry dataBefore,
@Nonnull final WriteContext writeContext)
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java
index e19f00b9e..1b5248f79 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java
@@ -74,14 +74,6 @@ public class L2FibEntryCustomizer extends FutureJVppCustomizer
}
@Override
- public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<L2FibEntry> id,
- @Nonnull final L2FibEntry dataBefore, @Nonnull final L2FibEntry dataAfter,
- @Nonnull final WriteContext writeContext) throws WriteFailedException {
- throw new UnsupportedOperationException(
- "L2 FIB entry update is not supported. It has to be deleted and then created.");
- }
-
- @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<L2FibEntry> id,
@Nonnull final L2FibEntry dataBefore, @Nonnull final WriteContext writeContext)
throws WriteFailedException {