summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java')
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
index a93f08349..65e409d53 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/service/LispStateCheckServiceImpl.java
@@ -52,7 +52,15 @@ public final class LispStateCheckServiceImpl implements LispStateCheckService, J
.build();
}
- public void checkLispEnabled(@Nonnull final WriteContext ctx) {
+ @Override
+ public void checkLispEnabledBefore(@Nonnull final WriteContext ctx) {
+ // no need to dump here, can be read directly from context
+ checkState(ctx.readBefore(InstanceIdentifier.create(Lisp.class))
+ .or(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");
+ }
+
+ @Override
+ public void checkLispEnabledAfter(@Nonnull final WriteContext ctx) {
// no need to dump here, can be read directly from context
checkState(ctx.readAfter(InstanceIdentifier.create(Lisp.class))
.or(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled");