summaryrefslogtreecommitdiffstats
path: root/mpls/impl/src/main/java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-01-17 16:25:36 +0100
committerMarek Gradzki <mgradzki@cisco.com>2018-01-31 14:56:24 +0000
commit51941632d33a17a96e2c10d1d59d762258b1839f (patch)
tree95217cc768fe75425afdda2215bbfd2b24520a13 /mpls/impl/src/main/java
parent1fdb0b77a24367484287c2eeb3c31cc8b91ee097 (diff)
Add direct update support for static lsp
This is workaround for HONEYCOMB-421 (subtree writers + default update does not work well currently). Fixes HC2VPP-277 (at least basic scenarios). Change-Id: I7659436d6c376bdc63eaa36291d5c08792faad94 Signed-off-by: Marek Gradzki <mgradzki@cisco.com> (cherry picked from commit fc06ca33bc587ba2acff16e59645b3d386aa498d)
Diffstat (limited to 'mpls/impl/src/main/java')
-rw-r--r--mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
index d93e0343c..6aab1ed42 100644
--- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
+++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
@@ -69,6 +69,17 @@ final class StaticLspCustomizer implements ListWriterCustomizer<StaticLsp, Stati
}
@Override
+ public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<StaticLsp> id,
+ @Nonnull final StaticLsp dataBefore,
+ @Nonnull final StaticLsp dataAfter,
+ @Nonnull final WriteContext writeContext) throws WriteFailedException {
+ LOG.debug("Updating MPLS LSP: before={} after={}", dataBefore, dataAfter);
+ write(id, dataBefore, writeContext.getMappingContext(), false);
+ write(id, dataAfter, writeContext.getMappingContext(), true);
+ LOG.debug("MPLS LSP successfully configured: {}", dataAfter);
+ }
+
+ @Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<StaticLsp> id,
@Nonnull final StaticLsp dataBefore,
@Nonnull final WriteContext writeContext) throws WriteFailedException {