summaryrefslogtreecommitdiffstats
path: root/v3po
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-09-27 14:55:32 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-27 15:24:53 +0200
commit083a0439b72e4803ad713232a48c71d3dc9fbd42 (patch)
treea0b968c038b6cefa52185d26bb1a417ae2f34415 /v3po
parenta4b65a2de72906e53c94de3beb098744d6fc14ae (diff)
HONEYCOMB-180: mark read/write of ipv4 leaves unsupported
Change-Id: Ifa774054646a59e39e4cc017df3be1e9e64233de Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java22
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java3
3 files changed, 8 insertions, 19 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
index bb5ffb484..db089c0c2 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
@@ -126,7 +126,7 @@ public final class InterfacesWriterFactory implements WriterFactory {
ifcId);
// Ipv4(after interface)
final InstanceIdentifier<Ipv4> ipv4Id = ifc1AugId.child(Ipv4.class);
- registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp, ifcNamingContext)),
+ registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp)),
ifcId);
// Address(after Ipv4) =
final InstanceIdentifier<Address> ipv4AddressId = ipv4Id.child(Address.class);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
index 1a9ed303a..0dca721ae 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
@@ -18,11 +18,8 @@ package io.fd.honeycomb.translate.v3po.interfaces.ip;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
import io.fd.honeycomb.translate.write.WriteContext;
-import io.fd.honeycomb.translate.write.WriteFailedException;
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.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.openvpp.jvpp.core.future.FutureJVppCore;
@@ -32,35 +29,28 @@ import org.slf4j.LoggerFactory;
public class Ipv4Customizer extends FutureJVppCustomizer implements WriterCustomizer<Ipv4> {
private static final Logger LOG = LoggerFactory.getLogger(Ipv4Customizer.class);
- private final NamingContext interfaceContext;
- public Ipv4Customizer(final FutureJVppCore vppApi, final NamingContext interfaceContext) {
+ public Ipv4Customizer(final FutureJVppCore vppApi) {
super(vppApi);
- this.interfaceContext = interfaceContext;
}
@Override
public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id,
- @Nonnull final Ipv4 dataAfter, @Nonnull final WriteContext writeContext)
- throws WriteFailedException {
-
- //TODO - add subnet validation after HONEYCOMB-201
+ @Nonnull final Ipv4 dataAfter, @Nonnull final WriteContext writeContext) {
+ LOG.debug("Handling Ipv4 leaves (mtu, forwarding) is not supported by VPP API. Ignoring configuration");
}
@Override
public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id,
@Nonnull final Ipv4 dataBefore, @Nonnull final Ipv4 dataAfter,
- @Nonnull final WriteContext writeContext)
- throws WriteFailedException {
- final String ifcName = id.firstKeyOf(Interface.class).getName();
-
- // TODO handle update in a better way
+ @Nonnull final WriteContext writeContext) {
+ LOG.debug("Handling Ipv4 leaves (mtu, forwarding) is not supported by VPP API. Ignoring configuration");
}
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id,
@Nonnull final Ipv4 dataBefore, @Nonnull final WriteContext writeContext) {
- // TODO HONEYCOMB-180 implement delete
+ LOG.debug("Handling Ipv4 leaves (mtu, forwarding) is not supported by VPP API. Ignoring configuration");
}
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
index a14422d8e..6296d01cc 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
@@ -53,8 +53,7 @@ public class Ipv4Customizer extends FutureJVppCustomizer implements ReaderCustom
@Override
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id, @Nonnull final Ipv4Builder builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
- //TODO HONEYCOMB-180 add reading of isForwarding flag when there is dump for it
- LOG.warn("Operation not supported");
+ LOG.debug("Reading Ipv4 leaves (mtu, forwarding) is not supported by VPP API");
}
}