Merge "JUnit test - LispAddressUtil - remaining methods."
authorFlorin Coras <florin.coras+odl@gmail.com>
Mon, 7 Mar 2016 11:11:42 +0000 (11:11 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 7 Mar 2016 11:11:42 +0000 (11:11 +0000)
commons/parent/pom.xml
mappingservice/doc/umls/components.png [new file with mode: 0644]
mappingservice/doc/umls/components.puml [new file with mode: 0644]
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/util/LispAddressUtil.java

index 574f38571bb968b1c1b4bfdcf33873abdff8211f..6b40c898a925023f203fb52edcdd0886c764921d 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.8.1</version>
         <configuration>
           <doclet>org.jboss.apiviz.APIviz</doclet>
           <docletArtifact>
diff --git a/mappingservice/doc/umls/components.png b/mappingservice/doc/umls/components.png
new file mode 100644 (file)
index 0000000..fb424f8
Binary files /dev/null and b/mappingservice/doc/umls/components.png differ
diff --git a/mappingservice/doc/umls/components.puml b/mappingservice/doc/umls/components.puml
new file mode 100644 (file)
index 0000000..af0af52
--- /dev/null
@@ -0,0 +1,74 @@
+@startuml
+title Mapping Service Components
+
+' === api ===
+[api]
+frame odl-lisp-sb.yang as odllispsb {
+    () "lisp-sb" as lispsb
+}
+odllispsb -- [api]
+
+frame odl-mappingservice.yang as odlmappingservice {
+    () mappingservice
+    () "mappingservice-shell" as mappingserviceshell
+    () "lisp-mappingservice" as lispmappingservice
+    () "RPCs"
+    () notification
+}
+odlmappingservice -- [api]
+
+frame odl-mappingservice-dao.yang as odlmappingservicedao {
+    () "mappingservice-dao" as mappingservicedao
+}
+odlmappingservicedao -- [api]
+
+
+' === lisp-proto ===
+'[lisp-proto]
+
+
+' === inmemorydb ===
+[inmemorydb]
+frame odl-mappingservice-dao-inmemorydb.yang as odlmappingservicedaoinmemorydb {
+    () "mappingservice-dao-inmemorydb" as mappingservicedaoinmemorydb
+}
+[inmemorydb] -- odlmappingservicedaoinmemorydb
+mappingservicedao <... mappingservicedaoinmemorydb : use
+
+
+' === implementation ===
+[implementation]
+frame odl-mappingservice-impl.yang as odlmappingserviceimpl {
+    () "mappingservice-impl" as mappingserviceimpl
+    () "lisp-mappingservice-impl" as lispmappingserviceimpl
+}
+[implementation] -- odlmappingserviceimpl
+mappingservice <... mappingserviceimpl : use
+lispmappingservice <... lispmappingserviceimpl : use
+
+frame odl-mappingservice-shell-impl.yang as odlmappingserviceshellimpl {
+    () "mappingservice-shell-impl" as mappingserviceshellimpl
+}
+[implementation] -- odlmappingserviceshellimpl
+mappingserviceshell <... mappingserviceshellimpl : use
+
+
+' === southbound ===
+[southbound]
+frame config-lisp.yang as configlisp {
+    () lispconfig
+    () "lispconfig-rpc" as lispconfigrpc
+}
+[southbound] -- configlisp
+
+frame odl-lisp-sb-impl.yang as odllispsbimpl {
+    () "lisp-sb-impl" as lispsbimpl
+}
+[southbound] -- odllispsbimpl
+lispsb <... lispsbimpl : use
+
+
+'[neutron]
+'[shell]
+
+@enduml
\ No newline at end of file
index 760c9d1247ce2f457cdf939f7b3638f031d81c1a..24b18167611b1756d962073bb7a2c0d62c96aa99 100644 (file)
@@ -283,7 +283,7 @@ public final class LispAddressUtil {
     public static Eid toIpPrefixEid(IpAddress addr, int vni) {
         // If you touch this, be sure that sfclisp compiles!
         int mask = addressTypeFromIpAddress(addr) == Ipv4Afi.class ? 32 : 128;
-        IpPrefix prefix = asIpPrefix(addr.getValue().toString(), mask);
+        IpPrefix prefix = asIpPrefix(String.valueOf(addr.getValue()), mask);
         // XXX getMapping rcp fails if VNI set to 0
         return toEidNoVni(prefix);
     }
@@ -551,8 +551,8 @@ public final class LispAddressUtil {
             }
             return 0;
         } else if (a instanceof Inet6Address && b instanceof Inet6Address) {
-            byte[] aBytes = ((Inet4Address) a).getAddress();
-            byte[] bBytes = ((Inet4Address) b).getAddress();
+            byte[] aBytes = ((Inet6Address) a).getAddress();
+            byte[] bBytes = ((Inet6Address) b).getAddress();
             for (i = 0; i < 16; i++) {
                 if (aBytes[i] < bBytes[i]) {
                     return -1;