Merge "Bug 8746: Multi-threading improvements"
authorVina Ermagan <vermagan@cisco.com>
Mon, 14 Aug 2017 00:13:54 +0000 (00:13 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 14 Aug 2017 00:13:54 +0000 (00:13 +0000)
21 files changed:
artifacts/pom.xml
commons/parent/pom.xml
features/features-lispflowmapping/pom.xml
features/odl-lispflowmapping-inmemorydb/pom.xml
features/odl-lispflowmapping-mappingservice-shell/pom.xml
features/odl-lispflowmapping-mappingservice/pom.xml
features/odl-lispflowmapping-models/pom.xml
features/odl-lispflowmapping-msmr/pom.xml
features/odl-lispflowmapping-neutron/pom.xml
features/odl-lispflowmapping-southbound/pom.xml
features/odl-lispflowmapping-ui/pom.xml
features/pom.xml
lispflowmapping-karaf/pom.xml
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingSystem.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServerTest.java
mappingservice/lisp-proto/pom.xml
mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java [deleted file]
mappingservice/lisp-proto/src/main/yang/ietf-lisp-address-types.yang [deleted file]
mappingservice/pom.xml

index 0cb555ee44c793b0e7901556dfdda926451bdb21..df20457233eccd63a2dd1f20bfa82572c0ad64fb 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 3a73e1e9c55e81f512337937d256330dcf5cb3db..e45421a002cf88368a53a666ad7dae6e78ac7103 100644 (file)
@@ -15,7 +15,7 @@
          for plugin configuration etc. -->
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 90078774fac55e5061e0f6b31b45ee1e0fcf2d35..604c6f4c72b4e14822a3f96f0d2ff0552c0ce959 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>feature-repo-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index ce650686185251bbfd8a9ab347f0fde09bb0c5a7..ec4b7f35093815271fcee13c52d09807c6945179 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index e6c3fbcfaba305e3ca0a617935d408226c15e725..ee13a17c34ede122ce60d6423f4934ec24a10bdd 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 5f74fcf206ca7e0603524a458cdd520192d0c192..3384c9d23b52592edc087b3479433fae56a454cc 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 1cae54c07d65fc78a3279a0c9408c9ae477449cc..84f31aa3ac4fc72ea65b69a362b38d9e70c3e532 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index fe39e8a384f79266c2711991ab29fdbb853d86dc..99a8315ca1e3951763b2fee35b6e728d22dbf334 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index a187f56343aa5f58e169635db5604b542988ac91..906058ba5741ea758919b46b660cf2e0cb548227 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 5e261b8dbb13bcac8ff7e14fae01f66889479ece..bdd2f667e34c8d5f488856a3ea7907a7c7391d5b 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
@@ -42,7 +42,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odl-netty-4</artifactId>
-      <version>2.0.2</version>
+      <version>2.0.4</version>
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
index 4c9d0046dbeffb7c5d0671cbbcb81aa984da3598..752181404f5a17d8a77babf4360321f01c24a7ce 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index d250e5e8c135c5efcc10a33706d67411648af270..42968d4d34fc603a678283d3fbfcf9506bcac9dd 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 76b6f1c6c8f8013bcdeb5c469b8217c5d739d76f..dd01362151f2c4f98964b23dc40db52509c90ec8 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>
 
index 14acd328e95884e34745b7bc9eb945ae9db159a1..17673e8a12d854467715b3be010be50bb0038915 100644 (file)
@@ -306,6 +306,9 @@ public class MappingService implements OdlMappingserviceService, IMappingService
 
     @Override
     public void removeMapping(MappingOrigin origin, Eid key) {
+        if (origin.equals(MappingOrigin.Southbound)) {
+            mappingSystem.removeMapping(origin, key);
+        }
         dsbe.removeMapping(DSBEInputUtil.toMapping(origin, key));
     }
 
index 52d95e34b0c90ad07c7f552187558bd3ce71d458..b25e5986bb186b6bd1d1739f38111fcea1ec625b 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.lispflowmapping.implementation;
 
-import java.util.AbstractMap.SimpleImmutableEntry;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.EnumMap;
@@ -417,13 +416,17 @@ public class MappingSystem implements IMappingSystem {
         dsbe.removeXtrIdMapping(DSBEInputUtil.toXtrIdMapping(mappingData));
     }
 
+    @SuppressWarnings("unchecked")
     private void removeSbMapping(Eid key, MappingData mappingData) {
         if (mappingData != null && mappingData.getXtrId() != null) {
             removeSbXtrIdSpecificMapping(key, mappingData.getXtrId(), mappingData);
         }
+
         removeFromSbTimeoutService(key);
+        Set<Subscriber> subscribers = (Set<Subscriber>) getData(MappingOrigin.Southbound, key, SubKeys.SUBSCRIBERS);
         smc.removeMapping(key);
         dsbe.removeMapping(DSBEInputUtil.toMapping(MappingOrigin.Southbound, key, mappingData));
+        notifyChange(mappingData, subscribers, null, MappingChange.Removed);
     }
 
     private void removeFromSbTimeoutService(Eid key) {
@@ -476,16 +479,17 @@ public class MappingSystem implements IMappingSystem {
         MappingData mapping = (MappingData) tableMap.get(origin).getMapping(null, key);
 
         if (mapping != null) {
+            MappingData notificationMapping = mapping;
             subscribers = (Set<Subscriber>) getData(MappingOrigin.Southbound, key, SubKeys.SUBSCRIBERS);
             // For SrcDst LCAF also send SMRs to Dst prefix
             if (key.getAddress() instanceof SourceDestKey) {
                 Eid dstAddr = SourceDestKeyHelper.getDstBinary(key);
                 dstSubscribers = (Set<Subscriber>) getData(MappingOrigin.Southbound, dstAddr, SubKeys.SUBSCRIBERS);
                 if (!(mapping.getRecord().getEid().getAddress() instanceof SourceDestKey)) {
-                    mapping = new MappingData(new MappingRecordBuilder().setEid(key).build());
+                    notificationMapping = new MappingData(new MappingRecordBuilder().setEid(key).build());
                 }
             }
-            notifyChange(mapping, subscribers, dstSubscribers, MappingChange.Removed);
+            notifyChange(notificationMapping, subscribers, dstSubscribers, MappingChange.Removed);
         }
 
         if (origin == MappingOrigin.Northbound) {
@@ -495,12 +499,7 @@ public class MappingSystem implements IMappingSystem {
         if (origin == MappingOrigin.Southbound) {
             removeFromSbTimeoutService(key);
             if (mapping != null && mapping.isPositive().or(false)) {
-                SimpleImmutableEntry<Eid, Set<Subscriber>> mergedNegativePrefix = computeMergedNegativePrefix(key);
-                if (mergedNegativePrefix != null) {
-                    addNegativeMapping(mergedNegativePrefix.getKey());
-                    subscribers = mergedNegativePrefix.getValue();
-                    notifyChange(mapping, subscribers, null, MappingChange.Created);
-                }
+                mergeNegativePrefixes(key);
             }
         }
         tableMap.get(origin).removeMapping(key);
@@ -518,21 +517,17 @@ public class MappingSystem implements IMappingSystem {
     }
 
 
-    @SuppressWarnings("unchecked")
     /*
-     * Returns the "merged" prefix and the subscribers of the prefixes that were merged.
+     * Merges adjacent negative prefixes and notifies their subscribers.
      */
-    private SimpleImmutableEntry<Eid, Set<Subscriber>> computeMergedNegativePrefix(Eid eid) {
-        // Variable to hold subscribers we collect along the way
-        Set<Subscriber> subscribers = null;
-
+    private void mergeNegativePrefixes(Eid eid) {
         // If prefix sibling has a negative mapping, save its subscribers
         Eid sibling = smc.getSiblingPrefix(eid);
         MappingData mapping = (MappingData) smc.getMapping(null, sibling);
         if (mapping != null && mapping.isNegative().or(false)) {
-            subscribers = (Set<Subscriber>) getData(MappingOrigin.Southbound, eid, SubKeys.SUBSCRIBERS);
+            removeSbMapping(sibling, mapping);
         } else {
-            return null;
+            return;
         }
 
         Eid currentNode = sibling;
@@ -540,15 +535,13 @@ public class MappingSystem implements IMappingSystem {
         while ((currentNode = smc.getVirtualParentSiblingPrefix(currentNode)) != null) {
             mapping = (MappingData) smc.getMapping(null, currentNode);
             if (mapping != null && mapping.isNegative().or(false)) {
-                subscribers.addAll((Set<Subscriber>)
-                        getData(MappingOrigin.Southbound, currentNode, SubKeys.SUBSCRIBERS));
                 removeSbMapping(currentNode, mapping);
             } else {
                 break;
             }
             previousNode = currentNode;
         }
-        return new SimpleImmutableEntry<>(getVirtualParent(previousNode), subscribers);
+        addNegativeMapping(getVirtualParent(previousNode));
     }
 
     private static Eid getVirtualParent(Eid eid) {
@@ -698,10 +691,6 @@ public class MappingSystem implements IMappingSystem {
         buildMapCaches();
     }
 
-    /*
-     * XXX  Mappings and keys should be separated for this to work properly, as is it will remove northbound originated
-     * authentication keys too, since they are currently stored in smc.
-     */
     public void cleanSBMappings() {
         smc = new SimpleMapCache(sdao);
     }
index eb6d666159213fcc3a46063a4d9ad089a21c79f3..f281bd896ce118a819520ab2f1dcdb6c823170eb 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.lispflowmapping.implementation.lisp;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
@@ -104,9 +105,8 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS
     @SuppressWarnings("unchecked")
     public void handleMapRegister(MapRegister mapRegister) {
         boolean mappingUpdated = false;
-        boolean oldMappingRemoved = false;
         boolean merge = ConfigIni.getInstance().mappingMergeIsSet() && mapRegister.isMergeEnabled();
-        Set<Subscriber> subscribers = null;
+        Set<Subscriber> subscribers = Sets.newConcurrentHashSet();
         MappingRecord oldMapping;
 
         if (merge) {
@@ -127,9 +127,21 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS
 
             oldMapping = getMappingRecord(mapService.getMapping(MappingOrigin.Southbound, eid));
             mapService.addMapping(MappingOrigin.Southbound, eid, getSiteId(mapRegister), mappingData);
-            if (oldMapping != null && MappingRecordUtil.isNegativeMapping(oldMapping)) {
+            if (oldMapping != null
+                    && MappingRecordUtil.isNegativeMapping(oldMapping)
+                    && !oldMapping.getEid().equals(eid)) {
+                if (subscriptionService) {
+                    // Here we save the subscribers of the OLD mapping before removing. We will add to this set the
+                    // subscribers of the NEW mapping below (since the EIDs are different, the result of
+                    // mappingChanged() will be true, and then send an SMR to all subscribers with the EID of the NEW
+                    // mapping only.
+                    Set<Subscriber> oldMappingSubscribers = getSubscribers(oldMapping.getEid());
+                    if (oldMappingSubscribers != null) {
+                        subscribers.addAll(oldMappingSubscribers);
+                        LoggingUtil.logSubscribers(LOG, oldMapping.getEid(), subscribers);
+                    }
+                }
                 mapService.removeMapping(MappingOrigin.Southbound, oldMapping.getEid());
-                oldMappingRemoved = true;
             }
 
             if (subscriptionService) {
@@ -139,19 +151,17 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS
                 if (mappingChanged(oldMapping, newMapping)) {
                     if (LOG.isDebugEnabled()) {
                         LOG.debug("Mapping update occured for {} SMRs will be sent for its subscribers.",
-                                LispAddressStringifier.getString(mapping.getEid()));
+                                LispAddressStringifier.getString(eid));
                     }
-                    subscribers = getSubscribers(eid);
+                    Set<Subscriber> newMappingSubscribers = getSubscribers(eid);
                     if (oldMapping != null && !oldMapping.getEid().equals(eid)) {
-                        subscribers = addParentSubscribers(eid, subscribers);
+                        newMappingSubscribers = addParentSubscribers(eid, newMappingSubscribers);
                     }
-                    LoggingUtil.logSubscribers(LOG, eid, subscribers);
-                    handleSmr(eid, subscribers);
-                    if (oldMapping != null && oldMappingRemoved && !oldMapping.getEid().equals(eid)) {
-                        subscribers = getSubscribers(oldMapping.getEid());
-                        LoggingUtil.logSubscribers(LOG, oldMapping.getEid(), subscribers);
-                        handleSmr(oldMapping.getEid(), subscribers);
+                    if (newMappingSubscribers != null) {
+                        subscribers.addAll(newMappingSubscribers);
+                        LoggingUtil.logSubscribers(LOG, eid, subscribers);
                     }
+                    handleSmr(eid, subscribers);
                     mappingUpdated = true;
                 }
             }
index b41beb2339fc0ea7dfc360327a284f852d529aea..6659ecae8f296717afda5f52a1ae19ae2aed493d 100644 (file)
@@ -180,7 +180,7 @@ public class MapServerTest {
                 .setAuthenticationData(null).build(), null);
 
         // only 1 subscriber has timed out.
-        assertEquals(1, subscriberSetMock_1.size());
+        assertEquals(2, subscriberSetMock_1.size());
     }
 
     @Test
@@ -329,7 +329,7 @@ public class MapServerTest {
 
         // for Ipv4 mapping
         final ArgumentCaptor<MapRequest> captor_3 = ArgumentCaptor.forClass(MapRequest.class);
-        Mockito.verify(notifyHandler, Mockito.times(1)).handleSMR(captor_3.capture(), Mockito.eq(RLOC_6));
+        Mockito.verify(notifyHandler, Mockito.times(2)).handleSMR(captor_3.capture(), Mockito.eq(RLOC_6));
         final Eid resultEid_3 = captor_3.getValue().getEidItem().iterator().next().getEid();
         assertEquals(IPV4_SOURCE_EID_6, resultEid_3);
     }
index 0d69d9bc66659cd7f185f36296804fdaf4e84387..ecfc3d1449e3b73c9676c3e28d525817a0adad40 100644 (file)
@@ -37,6 +37,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>ietf-yang-types-20130715</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-lisp-address-types-2015-11-05</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>iana-afn-safi</artifactId>
diff --git a/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java b/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
deleted file mode 100644 (file)
index b201f94..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
-
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
-
-
-/**
- * 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).
- *
- * 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 static SimpleAddress getDefaultInstance(String defaultValue) {
-        SimpleAddress address = tryIpAddress(defaultValue);
-        if (address != null) {
-            return address;
-        }
-
-        address = tryIpPrefix(defaultValue);
-        if (address != null) {
-            return address;
-        }
-
-        address = tryMacAddress(defaultValue);
-        if (address != null) {
-            return address;
-        }
-
-        // XXX need support for MAC addresses and AS numbers
-        address = new SimpleAddress(new DistinguishedNameType(defaultValue));
-
-        return address;
-    }
-
-    private static SimpleAddress tryIpAddress(String defaultValue) {
-        try {
-            SimpleAddress address = new SimpleAddress(IpAddressBuilder.getDefaultInstance(defaultValue));
-            return address;
-        } catch (IllegalArgumentException e) {
-            return null;
-        }
-    }
-
-    private static SimpleAddress tryIpPrefix(String defaultValue) {
-        try {
-            SimpleAddress address = new SimpleAddress(IpPrefixBuilder.getDefaultInstance(defaultValue));
-            return address;
-        } catch (IllegalArgumentException e) {
-            return null;
-        }
-    }
-
-    private static SimpleAddress tryMacAddress(String defaultValue) {
-        try {
-            SimpleAddress address = new SimpleAddress(new MacAddress(defaultValue));
-            return address;
-        } catch (IllegalArgumentException e) {
-            return null;
-        }
-    }
-}
diff --git a/mappingservice/lisp-proto/src/main/yang/ietf-lisp-address-types.yang b/mappingservice/lisp-proto/src/main/yang/ietf-lisp-address-types.yang
deleted file mode 100644 (file)
index c9c0b7b..0000000
+++ /dev/null
@@ -1,675 +0,0 @@
-module ietf-lisp-address-types {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-lisp-address-types";
-  prefix laddr;
-  import ietf-inet-types {
-    prefix inet;
-    revision-date 2013-07-15;
-  }
-  import ietf-yang-types {
-    prefix yang;
-    revision-date 2013-07-15;
-  }
-  organization
-    "IETF LISP (Locator/ID Separation Protocol) Working Group";
-  contact
-    "lisp@ietf.org";
-  description
-    "This YANG module defines the LISP Canonical Address Formats
-     (LCAF) for LISP. The module can be extended by vendors to
-     define vendor-specific parameters.
-
-     Copyright (c) 2014 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-
-     This version of this YANG module is part of RFC 6338; see
-     the RFC itself for full legal notices.
-
-    ";
-  revision 2015-11-05 {
-    description
-      "Initial revision.";
-    reference
-      "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10";
-  }
-  identity lisp-address-family {
-    description
-      "Base identity from which identities describing LISP address
-       families are derived.";
-  }
-  identity no-address-afi {
-    base lisp-address-family;
-    description
-      "IANA Reserved.";
-    }
-  identity ipv4-afi {
-    base lisp-address-family;
-    description
-      "IANA IPv4 address family.";
-  }
-  identity ipv4-prefix-afi {
-    base lisp-address-family;
-    description
-      "IANA IPv4 address family prefix.";
-  }
-  identity ipv6-afi {
-    base lisp-address-family;
-    description
-      "IANA IPv6 address family.";
-  }
-  identity ipv6-prefix-afi {
-    base lisp-address-family;
-    description
-      "IANA IPv6 address family prefix.";
-  }
-  identity mac-afi {
-    base lisp-address-family;
-    description
-      "IANA MAC address family.";
-  }
-  identity distinguished-name-afi {
-    base lisp-address-family;
-    description
-      "IANA Distinguished Name address family.";
-  }
-  identity as-number-afi {
-      base lisp-address-family;
-      description
-        "IANA AS Number address family.";
-  }
-  identity lcaf {
-    base lisp-address-family;
-    description
-      "IANA LISP Canonical Address Format address family.";
-  }
-  identity null-address-lcaf {
-    base lcaf;
-    description
-      "Null body LCAF type.";
-  }
-  identity afi-list-lcaf {
-    base lcaf;
-    description
-      "AFI-List LCAF type.";
-  }
-  identity instance-id-lcaf {
-    base lcaf;
-    description
-      "Instance-ID LCAF type.";
-  }
-  identity as-number-lcaf {
-    base lcaf;
-    description
-      "AS Number LCAF type.";
-  }
-  identity application-data-lcaf {
-    base lcaf;
-    description
-      "Application Data LCAF type.";
-  }
-  identity geo-coordinates-lcaf {
-    base lcaf;
-    description
-      "Geo-coordinates LCAF type.";
-  }
-  identity opaque-key-lcaf {
-    base lcaf;
-    description
-      "Opaque Key LCAF type.";
-  }
-  identity nat-traversal-lcaf {
-    base lcaf;
-    description
-      "NAT-Traversal LCAF type.";
-  }
-  identity nonce-locator-lcaf {
-    base lcaf;
-    description
-      "Nonce-Locator LCAF type.";
-  }
-  identity multicast-info-lcaf {
-    base lcaf;
-    description
-      "Multicast Info LCAF type.";
-  }
-  identity explicit-locator-path-lcaf {
-    base lcaf;
-    description
-      "Explicit Locator Path LCAF type.";
-  }
-  identity security-key-lcaf {
-    base lcaf;
-    description
-      "Security Key LCAF type.";
-  }
-  identity source-dest-key-lcaf {
-    base lcaf;
-    description
-      "Source/Dest LCAF type.";
-  }
-  identity replication-list-lcaf {
-    base lcaf;
-    description
-      "Replication-List LCAF type.";
-  }
-  identity json-data-model-lcaf {
-    base lcaf;
-    description
-      "JSON Data Model LCAF type.";
-  }
-  identity key-value-address-lcaf {
-    base lcaf;
-    description
-      "Key/Value Address LCAF type.";
-  }
-  identity encapsulation-format-lcaf {
-    base lcaf;
-    description
-      "Encapsulation Format LCAF type.";
-  }
-  identity service-path-lcaf {
-    base lcaf;
-    description
-      "Service Path LCAF type.";
-  }
-  typedef instance-id-type {
-    type uint32 {
-      range "0..16777215";
-    }
-    description
-      "Defines the range of values for an Instance ID.";
-  }
-  typedef service-path-id-type {
-    type uint32 {
-      range "0..16777215";
-    }
-    description
-      "Defines the range of values for a Service Path ID.";
-  }
-   typedef distinguished-name-type {
-    type string;
-    description
-      "Distinguished Name address.";
-    reference
-      "http://www.iana.org/assignments/address-family-numbers/
-       address-family-numbers.xhtml";
-  }
-  typedef simple-address {
-    type union {
-      type inet:ip-address;
-      type inet:ip-prefix;
-      type yang:mac-address;
-      type distinguished-name-type;
-      type inet:as-number;
-    }
-    description
-      "Union of address types that can be part of LCAFs.";
-  }
-
-  typedef lisp-address-family-ref {
-    type identityref {
-      base lisp-address-family;
-    }
-    description
-      "LISP address family reference.";
-  }
-  typedef lcaf-ref {
-    type identityref {
-      base lcaf;
-    }
-    description
-      "LCAF types reference.";
-  }
-
-  grouping lisp-address {
-    description
-      "Generic LISP address.";
-    leaf address-type {
-      type lisp-address-family-ref;
-      mandatory true;
-      description
-        "Type of the LISP address.";
-    }
-    leaf virtual-network-id {
-      type instance-id-type;
-      description
-        "Virtual Network Identifier (instance-id) of the address.";
-    }
-    choice address {
-      description
-        "Various LISP address types, including IP, MAC, and LCAF.";
-  
-      leaf no-address {
-        when "../address-type = 'laddr:no-addr-afi'" {
-          description
-            "When AFI is 0.";
-        }
-        type empty;
-        description
-          "No address.";
-      }
-      leaf ipv4 {
-        when "../address-type = 'laddr:ipv4-afi'" {
-          description
-            "When AFI is IPv4.";
-        }
-        type inet:ipv4-address;
-        description
-          "IPv4 address.";
-      }
-      leaf ipv4-prefix {
-        when "../address-type = 'laddr:ipv4-prefix-afi'" {
-          description
-            "When AFI is IPv4.";
-        }
-        type inet:ipv4-prefix;
-        description
-          "IPv4 prefix.";
-      }
-      leaf ipv6 {
-        when "../address-type = 'laddr:ipv6-afi'" {
-          description
-            "When AFI is IPv6.";
-        }
-        type inet:ipv6-address;
-        description
-          "IPv6 address.";
-      }
-      leaf ipv6-prefix {
-        when "../address-type = 'laddr:ipv6-prefix-afi'" {
-          description
-            "When AFI is IPv6.";
-        }
-        type inet:ipv6-prefix;
-        description
-          "IPv6 address.";
-      }
-      leaf mac {
-        when "../address-type = 'laddr:mac-afi'" {
-          description
-            "When AFI is MAC.";
-        }
-        type yang:mac-address;
-        description
-          "MAC address.";
-      }
-      leaf distinguished-name {
-        when "../address-type = 'laddr:distinguished-name-afi'" {
-          description
-            "When AFI is distinguished-name.";
-        }
-        type distinguished-name-type;
-        description
-          "Distinguished Name address.";
-      }
-      leaf as-number {
-        when "../address-type = 'laddr:as-number-afi'" {
-          description
-            "When AFI is as-number.";
-        }
-        type inet:as-number;
-        description
-          "AS Number.";
-      }
-      container null-address {
-        when "../address-type = 'laddr:null-address-lcaf'" {
-          description
-            "When LCAF type is null.";
-        }
-        description
-          "Null body LCAF type";
-        leaf address {
-          type empty;
-          description
-            "AFI address.";
-        }
-      }
-      container afi-list {
-        when "../address-type = 'laddr:afi-list-lcaf'" {
-          description
-            "When LCAF type is AFI-List.";
-        }
-        description
-          "AFI-List LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.16.1";
-        leaf-list address-list {
-          type simple-address;
-          description
-            "List of AFI addresses.";
-        }
-      }
-      container instance-id {
-        when "../address-type = 'laddr:instance-id-lcaf'" {
-          description
-            "When LCAF type is Instance-ID";
-        }
-        description
-          "Instance ID LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.2";
-        leaf iid {
-          type instance-id-type;
-          description
-            "Instance ID value.";
-        }
-        leaf mask-length {
-            type uint8;
-            description
-              "Mask length.";
-        }
-        leaf address {
-          type simple-address;
-          description
-            "AFI address.";
-        }
-      }
-      container as-number-lcaf {
-        when "../address-type = 'laddr:as-number-lcaf'" {
-          description
-            "When LCAF type is AS-Number.";
-        }
-        description
-          "AS Number LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.3";
-        leaf as {
-          type inet:as-number;
-          description
-            "AS number.";
-        }
-        leaf address {
-          type simple-address;
-          description
-            "AFI address.";
-        }
-      }
-      container application-data {
-        when "../address-type = 'laddr:application-data-lcaf'" {
-          description
-            "When LCAF type is Application Data.";
-        }
-        description
-          "Application Data LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.4";
-        leaf address {
-            type simple-address;
-            description
-              "AFI address.";
-        }
-        leaf protocol {
-            type uint8;
-            description
-              "Protocol number.";
-        }
-        leaf ip-tos {
-            type int32;
-            description
-              "Type of service field.";
-        }
-        leaf local-port-low {
-            type inet:port-number;
-            description
-              "Low end of local port range.";
-        }
-        leaf local-port-high {
-            type inet:port-number;
-            description
-              "High end of local port range.";
-        }
-        leaf remote-port-low {
-            type inet:port-number;
-            description
-              "Low end of remote port range.";
-        }
-        leaf remote-port-high {
-            type inet:port-number;
-            description
-              "High end of remote port range.";
-        }
-      }
-      container geo-coordinates {
-        when "../address-type = 'laddr:geo-coordinates-lcaf'" {
-          description
-            "When LCAF type is Geo-coordinates.";
-        }
-        description
-          "Geo-coordinates LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.5";
-        leaf latitude {
-          type bits {
-            bit N {
-              description
-                "Latitude bit.";
-            }
-          }
-          description
-            "Bit that selects between North and South latitude.";
-        }
-        leaf latitude-degrees {
-          type uint8 {
-            range "0 .. 90";
-          }
-          description
-            "Degrees of latitude.";
-        }
-        leaf latitude-minutes {
-          type uint8 {
-            range "0..59";
-          }
-          description
-            "Minutes of latitude.";
-        }
-        leaf latitude-seconds {
-          type uint8 {
-            range "0..59";
-          }
-          description
-            "Seconds of latitude.";
-        }
-        leaf longitude {
-          type bits {
-            bit E {
-              description
-                "Longitude bit.";
-            }
-          }
-          description
-            "Bit that selects between East and West longitude.";
-        }
-        leaf longitude-degrees {
-          type uint16 {
-            range "0 .. 180";
-          }
-          description
-            "Degrees of longitude.";
-        }
-        leaf longitude-minutes {
-          type uint8 {
-            range "0..59";
-          }
-          description
-            "Minutes of longitude.";
-        }
-        leaf longitude-seconds {
-          type uint8 {
-            range "0..59";
-          }
-          description
-            "Seconds of longitude.";
-        }
-        leaf altitude {
-          type int32;
-          description
-            "Height relative to sea level in meters.";
-        }
-        leaf address {
-          type simple-address;
-          description
-            "AFI address.";
-        }
-      }
-      container nat-traversal {
-        when "../address-type = 'laddr:nat-traversal-lcaf'" {
-          description
-            "When LCAF type is NAT-Traversal.";
-        }
-        description
-          "NAT-Traversal LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.6";
-        leaf ms-udp-port {
-          type uint16;
-          description
-            "Map-Server UDP port (set to 4342).";
-        }
-        leaf etr-udp-port {
-          type uint16;
-          description
-            "ETR UDP port.";
-        }
-        leaf global-etr-rloc {
-          type simple-address;
-          description
-            "Global ETR RLOC address.";
-        }
-        leaf ms-rloc {
-          type simple-address;
-          description
-            "Map-Server RLOC address.";
-        }
-        leaf private-etr-rloc {
-          type simple-address;
-          description
-            "Private ETR RLOC address.";
-        }
-        leaf-list rtr-rlocs {
-          type simple-address;
-          description
-            "List of RTR RLOC addresses.";
-        }
-      }
-      container explicit-locator-path {
-        when "../address-type = 'laddr:explicit-locator-path-lcaf'" {
-          description
-            "When LCAF type type is Explicit Locator Path.";
-        }
-        description
-          "Explicit Locator Path LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.9";
-        list hop {
-          key "hop-id";
-          ordered-by user;
-          description
-            "List of locator hops forming the explicit path.";
-          leaf hop-id {
-            type string;
-            description
-              "Unique identifier for the hop.";
-          }
-          leaf address {
-            type simple-address;
-            description
-              "AFI address.";
-          }
-          leaf lrs-bits {
-            type bits{
-              bit lookup {
-                description
-                  "Lookup bit.";
-              }
-              bit rloc-probe {
-                description
-                  "RLOC-probe bit.";
-              }
-              bit strict {
-                description
-                  "Strict bit.";
-              }
-            }
-            description
-              "Flag bits per hop.";
-          }
-        }
-      }
-      container source-dest-key {
-        when "../address-type = 'laddr:source-dest-key-lcaf'" {
-          description
-            "When LCAF type type is Source/Dest.";
-        }
-        description
-          "Source/Dest LCAF type.";
-        reference
-            "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-            #section-4.11";
-        leaf source {
-          type simple-address;
-          description
-            "Source address.";
-        }
-        leaf dest {
-          type simple-address;
-          description
-            "Destination address.";
-        }
-      }
-      container key-value-address {
-        when "../address-type = 'laddr:key-value-address-lcaf'" {
-          description
-            "When LCAF type type is Key/Value Address.";
-        }
-        description
-          "Key/Value Address LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
-           #section-4.11";
-        leaf key {
-          type simple-address;
-          description
-            "Address as Key.";
-        }
-        leaf value {
-          type simple-address;
-          description
-            "Address as Value.";
-        }
-      }
-      container service-path {
-        when "../address-type = 'laddr:service-path-lcaf'" {
-        description
-          "When LCAF type service path identifier.";
-            }
-        description
-          "Service Path LCAF type.";
-        reference
-          "http://tools.ietf.org/html/draft-ermagan-lisp-nsh-00";
-        leaf service-path-id {
-          type service-path-id-type;
-          description
-            "Service path identifier for the path for NSH header";
-        }
-        leaf service-index {
-          type uint8;
-          description
-            "Service path index for NSH header";
-        }
-      }
-    }
-  }
-}
index 6aff26d431eedc7bc258762797823cd280df47ef..0f32bf21d31c236e966ce6d6859fc1ace0589ac0 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>2.0.2</version>
+    <version>2.0.4</version>
     <relativePath/>
   </parent>