summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump')
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/AbstractJvppDumpExecutor.java35
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/ItrRemoteLocatorSetDumpExecutor.java41
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutor.java57
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutor.java48
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java43
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java61
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/SubtableDumpExecutor.java53
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutor.java42
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/params/MappingsDumpParams.java3
9 files changed, 1 insertions, 382 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/AbstractJvppDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/AbstractJvppDumpExecutor.java
deleted file mode 100644
index 65f41443c..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/AbstractJvppDumpExecutor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.annotation.Nonnull;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-
-
-/**
- * Abstract holder for jvpp reference
- */
-public abstract class AbstractJvppDumpExecutor {
-
- protected final FutureJVppCore vppApi;
-
- public AbstractJvppDumpExecutor(@Nonnull final FutureJVppCore vppApi) {
- this.vppApi = checkNotNull(vppApi, "VPP Api reference cannot be null");
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/ItrRemoteLocatorSetDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/ItrRemoteLocatorSetDumpExecutor.java
deleted file mode 100644
index 3b2114af8..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/ItrRemoteLocatorSetDumpExecutor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocs;
-import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocsReply;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public class ItrRemoteLocatorSetDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispGetMapRequestItrRlocsReply, Void>, JvppReplyConsumer {
-
- public ItrRemoteLocatorSetDumpExecutor(@Nonnull final FutureJVppCore vppApi) {
- super(vppApi);
- }
-
- @Override
- public LispGetMapRequestItrRlocsReply executeDump(final InstanceIdentifier<?> identifier, final Void params) throws
- ReadFailedException {
- return getReplyForRead(vppApi.lispGetMapRequestItrRlocs(new LispGetMapRequestItrRlocs()).toCompletableFuture(),
- identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutor.java
deleted file mode 100644
index d200597d6..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorDumpExecutor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import io.fd.honeycomb.lisp.translate.read.dump.executor.params.LocatorDumpParams;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-/**
- * Executor for dumping of locators
- */
-public class LocatorDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispLocatorDetailsReplyDump, LocatorDumpParams>, JvppReplyConsumer {
-
-
- public LocatorDumpExecutor(@Nonnull final FutureJVppCore vppApi) {
- super(vppApi);
- }
-
- @Override
- @Nonnull
- public LispLocatorDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier,
- final LocatorDumpParams params) throws
- ReadFailedException {
- checkNotNull(params, "Params for dump request not present");
-
- LispLocatorDump request = new LispLocatorDump();
- request.lsIndex = params.getLocatorSetIndex();
- //flag that lsIndex is set
- request.isIndexSet = (byte) 1;
-
- return getReplyForRead(vppApi.lispLocatorDump(request).toCompletableFuture(), identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutor.java
deleted file mode 100755
index c896556bb..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/LocatorSetsDumpExecutor.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispLocatorSetDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class LocatorSetsDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispLocatorSetDetailsReplyDump, Void>, JvppReplyConsumer {
-
- public LocatorSetsDumpExecutor(@Nonnull FutureJVppCore api) {
- super(api);
- }
-
- @Override
- @Nonnull
- public LispLocatorSetDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier, final Void params)
- throws ReadFailedException {
-
- LispLocatorSetDump request = new LispLocatorSetDump();
- //only local
- request.filter = 1;
-
- return getReplyForRead(vppApi.lispLocatorSetDump(request).toCompletableFuture(), identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java
deleted file mode 100755
index 8f19e7084..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispMapResolverDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class MapResolversDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispMapResolverDetailsReplyDump, Void>, JvppReplyConsumer {
-
- public MapResolversDumpExecutor(@Nonnull FutureJVppCore api) {
- super(api);
- }
-
- @Override
- @Nonnull
- public LispMapResolverDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier, final Void params) throws
- ReadFailedException {
- return getReplyForRead(vppApi.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture(), identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
deleted file mode 100755
index 778ce5308..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-/**
- * Common dump executor for both local and remote mappings
- */
-public class MappingsDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispEidTableDetailsReplyDump, MappingsDumpParams>, JvppReplyConsumer {
-
- public MappingsDumpExecutor(@Nonnull FutureJVppCore vppApi) {
- super(vppApi);
- }
-
-
- @Override
- @Nonnull
- public LispEidTableDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier,
- final MappingsDumpParams params)
- throws ReadFailedException {
- checkNotNull(params, "Params for dump request not present");
-
- LispEidTableDump request = new LispEidTableDump();
- request.eid = params.getEid();
- request.eidSet = params.getEidSet();
- request.eidType = params.getEidType();
- request.prefixLength = params.getPrefixLength();
- request.vni = params.getVni();
- request.filter = params.getFilter();
-
- return getReplyForRead(vppApi.lispEidTableDump(request).toCompletableFuture(), identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/SubtableDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/SubtableDumpExecutor.java
deleted file mode 100644
index bf5451294..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/SubtableDumpExecutor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import io.fd.honeycomb.lisp.translate.read.dump.executor.params.SubtableDumpParams;
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableMapDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.eid.table.grouping.eid.table.vni.table.BridgeDomainSubtable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev161214.eid.table.grouping.eid.table.vni.table.VrfSubtable;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-/**
- * Dump executor for {@link VrfSubtable}/{@link BridgeDomainSubtable}
- */
-public final class SubtableDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispEidTableMapDetailsReplyDump, SubtableDumpParams>, JvppReplyConsumer {
-
- public SubtableDumpExecutor(@Nonnull final FutureJVppCore vppApi) {
- super(vppApi);
- }
-
- @Override
- public LispEidTableMapDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier,
- final SubtableDumpParams params)
- throws ReadFailedException {
- LispEidTableMapDump request = new LispEidTableMapDump();
- request.isL2 = checkNotNull(params, "Cannot bind null params").isL2();
-
- return getReplyForRead(vppApi.lispEidTableMapDump(request).toCompletableFuture(), identifier);
- }
-
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutor.java
deleted file mode 100755
index 200d47c6f..000000000
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/VniTableDumpExecutor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.lisp.translate.read.dump.executor;
-
-
-import io.fd.honeycomb.translate.read.ReadFailedException;
-import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetailsReplyDump;
-import io.fd.vpp.jvpp.core.dto.LispEidTableVniDump;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-
-public class VniTableDumpExecutor extends AbstractJvppDumpExecutor
- implements EntityDumpExecutor<LispEidTableVniDetailsReplyDump, Void>, JvppReplyConsumer {
-
- public VniTableDumpExecutor(@Nonnull FutureJVppCore api) {
- super(api);
- }
-
- @Override
- public LispEidTableVniDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier, Void params)
- throws ReadFailedException {
- return getReplyForRead(vppApi.lispEidTableVniDump(new LispEidTableVniDump()).toCompletableFuture(), identifier);
- }
-}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/params/MappingsDumpParams.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/params/MappingsDumpParams.java
index 1f7990c9b..d1af212b8 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/params/MappingsDumpParams.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/params/MappingsDumpParams.java
@@ -16,11 +16,10 @@
package io.fd.honeycomb.lisp.translate.read.dump.executor.params;
-import io.fd.honeycomb.lisp.translate.read.dump.executor.MappingsDumpExecutor;
import java.util.Arrays;
/**
- * Parameters for executing {@link MappingsDumpExecutor}
+ * Parameters for executing dump of mappings
*/
public final class MappingsDumpParams {