summaryrefslogtreecommitdiffstats
path: root/samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java
diff options
context:
space:
mode:
Diffstat (limited to 'samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java')
-rw-r--r--samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java b/samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java
index af185d8b0..01d29003f 100644
--- a/samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java
+++ b/samples/interfaces/mapping/src/main/java/io/fd/honeycomb/samples/interfaces/mapping/config/InterfaceWriterCustomizer.java
@@ -54,15 +54,15 @@ public class InterfaceWriterCustomizer implements ListWriterCustomizer<Interface
}
}
+ /*
+ * For nodes that does not have support for update operation directly, there's no need to override
+ * updateCurrentAttributes method. Updates will be handlers as combination of delete + create. If you want to
+ * implement update directly, override method updateCurrentAttributes
@Override
public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id,
@Nonnull final Interface dataBefore, @Nonnull final Interface dataAfter,
@Nonnull final WriteContext writeContext) throws WriteFailedException {
- // There are cases when lower layer does not support all of the CRUD operations, in which case, the handler
- // should look like this (This will reject configuration from upper layers, returning error/rpc-error):
- throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter,
- new UnsupportedOperationException("Unable to update interface data, unsupported at lower layer"));
- }
+ }*/
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id,