summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-09-05 12:10:26 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-07 06:50:30 +0000
commit928d0b286b586c76658449480291b9445a52b74b (patch)
tree8e189476429a969b07f48bcf8ae9f8a693b444b0 /lisp
parent22c537234245863509e987f7781d3d769045a79b (diff)
Cleanup TODOs and FIXMEs
- Fix minor ones - Report bigger and include issue number in comment - Pull common dependencies into dependency management of common/parents Change-Id: I06a6ac37c52b603fd73ed42023d6b2e7fa18010f Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'lisp')
-rwxr-xr-xlisp/api/pom.xml12
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java (renamed from lisp/api/src/main/java/lisp/Ipv4Matcher.java)6
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java (renamed from lisp/api/src/main/java/lisp/Ipv6Matcher.java)4
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java (renamed from lisp/api/src/main/java/lisp/MacMatcher.java)4
-rw-r--r--lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java9
-rwxr-xr-xlisp/lisp2vpp/pom.xml10
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java18
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java5
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java2
-rwxr-xr-xlisp/pom.xml1
13 files changed, 28 insertions, 53 deletions
diff --git a/lisp/api/pom.xml b/lisp/api/pom.xml
index eb02e9325..960f88bc0 100755
--- a/lisp/api/pom.xml
+++ b/lisp/api/pom.xml
@@ -32,18 +32,6 @@
<project.translate.groupId>io.fd.honeycomb</project.translate.groupId>
</properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/lisp/api/src/main/java/lisp/Ipv4Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
index 546d40460..55f0ec907 100755
--- a/lisp/api/src/main/java/lisp/Ipv4Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * 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.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
@@ -22,7 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
/**
- * Class that checks whether {@link String} can represent Ipv4Address
+ * Class that checks whether {@link String} can represent Ipv4Address.
*/
public final class Ipv4Matcher {
diff --git a/lisp/api/src/main/java/lisp/Ipv6Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
index 209868ec8..947088f8f 100755
--- a/lisp/api/src/main/java/lisp/Ipv6Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * 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.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
diff --git a/lisp/api/src/main/java/lisp/MacMatcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
index 611c92e1e..663f4ff22 100755
--- a/lisp/api/src/main/java/lisp/MacMatcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * 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.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
index 3d340855e..681e87277 100644
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
@@ -18,9 +18,6 @@ package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.addre
import static com.google.common.base.Preconditions.checkNotNull;
-import lisp.Ipv4Matcher;
-import lisp.Ipv6Matcher;
-import lisp.MacMatcher;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
@@ -29,13 +26,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
/**
* The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
* In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
+ * <p/>
* The reason behind putting it under src/main/java is:
* This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
* loss of user code.
- *
*/
-public class SimpleAddressBuilder {
+public final class SimpleAddressBuilder {
public static SimpleAddress getDefaultInstance(String defaultValue) {
checkNotNull(defaultValue, "Cannot convert null address");
@@ -47,7 +43,6 @@ public class SimpleAddressBuilder {
} else if (MacMatcher.matches(defaultValue)) {
return new SimpleAddress(new MacAddress(defaultValue));
} else {
- //TODO - implement other conversions
throw new IllegalArgumentException("Unknown type");
}
}
diff --git a/lisp/lisp2vpp/pom.xml b/lisp/lisp2vpp/pom.xml
index 920d33a7e..3a5942ad5 100755
--- a/lisp/lisp2vpp/pom.xml
+++ b/lisp/lisp2vpp/pom.xml
@@ -16,10 +16,10 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>impl-parent</artifactId>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
<version>1.16.12-SNAPSHOT</version>
- <relativePath>../../common/impl-parent</relativePath>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -62,24 +62,20 @@
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-core</artifactId>
- <version>16.12-SNAPSHOT</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<!-- Testing Dependencies -->
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
index c38ca602f..dae41cebd 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
@@ -21,44 +21,44 @@ import net.jmob.guice.conf.core.Syntax;
/**
* Class containing static configuration for Lisp module,<br>
- * either loaded from property file or statically typed
+ * either loaded from property file or statically typed.
*/
@BindConfig(value = "lisp", syntax = Syntax.JSON)
public class LispConfiguration {
- //TODO - this constant should be part of V3po plugin
+ //TODO HONEYCOMB-176 - this constant should be part of V3po plugin
/**
- * Interface index to name mapping
+ * Interface index to name mapping.
*/
public static final String INTERFACE_CONTEXT = "interface-context";
/**
- * Locator set index to name mapping
+ * Locator set index to name mapping.
*/
public static final String LOCATOR_SET_CONTEXT = "locator-set-context";
/**
- * Local mappings's eid to name mapping
+ * Local mappings's eid to name mapping.
*/
public static final String LOCAL_MAPPING_CONTEXT = "local-mapping-context";
/**
- * Remote mappings's eid to name mapping
+ * Remote mappings's eid to name mapping.
*/
public static final String REMOTE_MAPPING_CONTEXT = "remote-mapping-context";
/**
- * Central honeycomb initializer
+ * Central honeycomb initializer.
*/
public static final String HONEYCOMB_INITIALIZER = "honeycomb-initializer";
/**
- * Unique prefix for naming context of interfaces
+ * Unique prefix for naming context of interfaces.
**/
public static final String INTERFACE_CONTEXT_PREFIX = "interface-";
/**
- * Unique prefix for naming context of locator sets
+ * Unique prefix for naming context of locator sets.
**/
public static final String LOCATOR_SET_CONTEXT_PREFIX = "locator-set-";
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
index 1a9721ca0..50baf6b0e 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
@@ -66,7 +66,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Adjacency> id,
@Nonnull final AdjacencyBuilder builder, @Nonnull final ReadContext ctx)
throws ReadFailedException {
- //TODO - finish after https://jira.fd.io/browse/VPP-362
+ // TODO - finish after https://jira.fd.io/browse/VPP-362
throw new ReadFailedException(id, new OperationNotSupportedException("Operation not supported"));
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
index 3d0801969..cc500e159 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
@@ -34,7 +34,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
- * Produces reader for {@link LocatorSets} <br> and all its inhired child readers
+ * Produces reader for {@link LocatorSets} <br> and all its inhired child readers.
*/
public class LocatorSetsReaderFactory extends AbstractLispReaderFactoryBase implements ReaderFactory {
@@ -42,8 +42,7 @@ public class LocatorSetsReaderFactory extends AbstractLispReaderFactoryBase impl
private LocatorSetsReaderFactory(final InstanceIdentifier<LispState> lispStateId,
final FutureJVppCore vppApi,
final NamingContext interfaceContext,
- final NamingContext locatorSetContext
- ) {
+ final NamingContext locatorSetContext) {
super(lispStateId, vppApi);
this.interfaceContext = interfaceContext;
this.locatorSetContext = locatorSetContext;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
index 39d0fe7f0..b0ca7fc04 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
@@ -206,7 +206,6 @@ public final class EidConverter {
} else if (address instanceof Mac) {
return MAC;
} else {
- //TODO - other types
throw new IllegalStateException("Unknown type detected");
}
}
@@ -256,7 +255,6 @@ public final class EidConverter {
case MAC:
return TranslateUtils.parseMac(((Mac) address).getMac().getValue());
default:
- //TODO - other types
throw new IllegalArgumentException("Unsupported type");
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
index c2db3b845..d6eaf4f68 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
@@ -47,7 +47,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
- * Customizer for {@link LocatorSet} entity
+ * Customizer for {@link LocatorSet} entity.
*
* @see LocatorSet
*/
@@ -77,7 +77,7 @@ public class LocatorSetCustomizer extends FutureJVppCustomizer
final String locatorSetName = dataAfter.getName();
checkNotNull(locatorSetName, "LocatorSet name is null");
- //TODO check and fill mapping when api returns index of created locator set
+ // TODO VPP-323 check and fill mapping when api returns index of created locator set
// checkState(!locatorSetContext.containsIndex(locatorSetName, writeContext.getMappingContext()),
// "Locator set with name %s allready defined", locatorSetName);
@@ -102,7 +102,7 @@ public class LocatorSetCustomizer extends FutureJVppCustomizer
public void updateCurrentAttributes(@Nonnull InstanceIdentifier<LocatorSet> id,
@Nonnull LocatorSet dataBefore,
@Nonnull LocatorSet dataAfter,
- WriteContext writeContext) throws WriteFailedException {
+ @Nonnull WriteContext writeContext) throws WriteFailedException {
throw new UnsupportedOperationException("Operation not supported");
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
index 15087ef24..0f06d2984 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
@@ -43,7 +43,5 @@ public class EidConverterTest {
new MacAddress("aa:bb:cc:dd:ee:ff"))
.build())
.build()));
-
- //TODO testing of other types when they are implemented
}
}
diff --git a/lisp/pom.xml b/lisp/pom.xml
index a3cab037c..2f06d6585 100755
--- a/lisp/pom.xml
+++ b/lisp/pom.xml
@@ -32,6 +32,7 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>api</module>
<module>lisp2vpp</module>