Bug 3380: Fix MD-SAL prefix overwriting 61/21461/1
authorLorand Jakab <lojakab@cisco.com>
Thu, 28 May 2015 18:28:45 +0000 (21:28 +0300)
committerLorand Jakab <lojakab@cisco.com>
Fri, 29 May 2015 23:35:56 +0000 (02:35 +0300)
The root cause of this bug was that the string representation for
maskable EID was just the base address, without the network mask.  This
commit adds the mask to the maskable addresses, and improves string
representation of LISP addresses in general.

Change-Id: I83d43ce41b5b88989c80bb3ac7a7e7fd5e1f225f
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/DataStoreBackEnd.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/serializer/LocatorRecordSerializer.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/InstanceIdentifierUtil.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispAFIConvertor.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispAddressStringifier.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispNotificationHelper.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispPrimitiveAddressStringifier.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/RPCInputConvertorUtil.java
mappingservice/implementation/src/main/resources/lfm_RESTCONF.json.postman_collection

index 825f2030e4101540c6c1e0ddfa2c4e06bda77565..76eb968cdec4fe08a25685ad53f07b9a5ab23efe 100644 (file)
@@ -32,6 +32,7 @@ import org.opendaylight.lispflowmapping.implementation.mdsal.DataStoreBackEnd;
 import org.opendaylight.lispflowmapping.implementation.mdsal.MappingDataListener;
 import org.opendaylight.lispflowmapping.implementation.serializer.LispMessage;
 import org.opendaylight.lispflowmapping.implementation.util.LispAFIConvertor;
+import org.opendaylight.lispflowmapping.implementation.util.LispAddressStringifier;
 import org.opendaylight.lispflowmapping.implementation.util.LispNotificationHelper;
 import org.opendaylight.lispflowmapping.interfaces.dao.ILispDAO;
 import org.opendaylight.lispflowmapping.interfaces.dao.ILispTypeConverter;
@@ -228,9 +229,9 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
     }
 
     public MapReply handleMapRequest(MapRequest request, boolean smr) {
-        LOG.debug("DAO: Retrieving mapping for {}/{}",
-                LispAFIConvertor.toString(request.getEidRecord().get(0).getLispAddressContainer()),
-                request.getEidRecord().get(0).getMask());
+        LOG.debug("DAO: Retrieving mapping for {}",
+                LispAddressStringifier.getString(request.getEidRecord().get(0).getLispAddressContainer(),
+                request.getEidRecord().get(0).getMask()));
 
         tlsMapReply.set(null);
         tlsMapRequest.set(null);
@@ -255,9 +256,9 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
     }
 
     public MapNotify handleMapRegister(MapRegister mapRegister, boolean smr) {
-        LOG.debug("DAO: Adding mapping for {}/{}",
-                LispAFIConvertor.toString(mapRegister.getEidToLocatorRecord().get(0).getLispAddressContainer()),
-                mapRegister.getEidToLocatorRecord().get(0).getMaskLength());
+        LOG.debug("DAO: Adding mapping for {}",
+                LispAddressStringifier.getString(mapRegister.getEidToLocatorRecord().get(0).getLispAddressContainer(),
+                mapRegister.getEidToLocatorRecord().get(0).getMaskLength()));
 
         tlsMapNotify.set(null);
         mapServer.handleMapRegister(mapRegister, smr, this);
@@ -267,22 +268,23 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
     }
 
     public String getAuthenticationKey(LispAddressContainer address, int maskLen) {
-        LOG.debug("DAO: Retrieving authentication key for {}/{}", LispAFIConvertor.toString(address), maskLen);
+        LOG.debug("DAO: Retrieving authentication key for {}", LispAddressStringifier.getString(address, maskLen));
         return mapServer.getAuthenticationKey(address, maskLen);
     }
 
     public void removeAuthenticationKey(LispAddressContainer address, int maskLen) {
-        LOG.debug("DAO: Removing authentication key for {}/{}", LispAFIConvertor.toString(address), maskLen);
+        LOG.debug("DAO: Removing authentication key for {}", LispAddressStringifier.getString(address, maskLen));
         mapServer.removeAuthenticationKey(address, maskLen);
     }
 
     public void addAuthenticationKey(LispAddressContainer address, int maskLen, String key) {
-        LOG.debug("DAO: Adding authentication key '{}' for {}/{}", key, LispAFIConvertor.toString(address), maskLen);
+        LOG.debug("DAO: Adding authentication key '{}' for {}", key,
+                LispAddressStringifier.getString(address, maskLen));
         mapServer.addAuthenticationKey(address, maskLen, key);
     }
 
     public void removeMapping(LispAddressContainer address, int maskLen) {
-        LOG.debug("DAO: Removing mapping for {}/{}", LispAFIConvertor.toString(address), maskLen);
+        LOG.debug("DAO: Removing mapping for {}", LispAddressStringifier.getString(address, maskLen));
         mapServer.removeMapping(address, maskLen, smr, this);
     }
 
index 4f68d41297bd402cef5cc787f872658a84c9a9e4..ecda8addad47016a65429c773eb188c02166d683 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.lispflowmapping.implementation.util.InstanceIdentifierUtil;
-import org.opendaylight.lispflowmapping.implementation.util.LispAFIConvertor;
+import org.opendaylight.lispflowmapping.implementation.util.LispAddressStringifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.db.instance.AuthenticationKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.db.instance.Mapping;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -39,12 +39,13 @@ public class DataStoreBackEnd {
     }
 
     public void addAuthenticationKey(AuthenticationKey authenticationKey) {
-        LOG.debug("MD-SAL: Adding authentication key '{}' for {}/{}", authenticationKey.getAuthkey(),
-                LispAFIConvertor.toString(authenticationKey.getLispAddressContainer()),
-                authenticationKey.getMaskLength());
+        LOG.debug("MD-SAL: Adding authentication key '{}' for {}", authenticationKey.getAuthkey(),
+                LispAddressStringifier.getString(authenticationKey.getLispAddressContainer(),
+                authenticationKey.getMaskLength()));
 
         InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
-                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer(),
+                        authenticationKey.getMaskLength());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.put(LogicalDatastoreType.CONFIGURATION, path, authenticationKey, true);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
@@ -52,11 +53,11 @@ public class DataStoreBackEnd {
     }
 
     public void addMapping(Mapping mapping) {
-        LOG.debug("MD-SAL: Adding mapping for {}/{}",
-                LispAFIConvertor.toString(mapping.getLispAddressContainer()), mapping.getMaskLength());
+        LOG.debug("MD-SAL: Adding mapping for {}",
+                LispAddressStringifier.getString(mapping.getLispAddressContainer(), mapping.getMaskLength()));
 
         InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
-                .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+                .createMappingIid(mapping.getLispAddressContainer(), mapping.getMaskLength(), mapping.getOrigin());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.put(LogicalDatastoreType.CONFIGURATION, path, mapping, true);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
@@ -64,12 +65,13 @@ public class DataStoreBackEnd {
     }
 
     public void removeAuthenticationKey(AuthenticationKey authenticationKey) {
-        LOG.debug("MD-SAL: Removing authentication key for {}/{}",
-                LispAFIConvertor.toString(authenticationKey.getLispAddressContainer()),
-                authenticationKey.getMaskLength());
+        LOG.debug("MD-SAL: Removing authentication key for {}",
+                LispAddressStringifier.getString(authenticationKey.getLispAddressContainer(),
+                authenticationKey.getMaskLength()));
 
         InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
-                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer(),
+                        authenticationKey.getMaskLength());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.delete(LogicalDatastoreType.CONFIGURATION, path);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
@@ -77,11 +79,11 @@ public class DataStoreBackEnd {
     }
 
     public void removeMapping(Mapping mapping) {
-        LOG.debug("MD-SAL: Removing mapping for {}/{}",
-                LispAFIConvertor.toString(mapping.getLispAddressContainer()), mapping.getMaskLength());
+        LOG.debug("MD-SAL: Removing mapping for {}",
+                LispAddressStringifier.getString(mapping.getLispAddressContainer(), mapping.getMaskLength()));
 
         InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
-                .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+                .createMappingIid(mapping.getLispAddressContainer(), mapping.getMaskLength(), mapping.getOrigin());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.delete(LogicalDatastoreType.CONFIGURATION, path);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
@@ -89,12 +91,13 @@ public class DataStoreBackEnd {
     }
 
     public void updateAuthenticationKey(AuthenticationKey authenticationKey) {
-        LOG.debug("MD-SAL: Updating authentication key for {}/{} with '{}'",
-                LispAFIConvertor.toString(authenticationKey.getLispAddressContainer()),
-                authenticationKey.getMaskLength(), authenticationKey.getAuthkey());
+        LOG.debug("MD-SAL: Updating authentication key for {} with '{}'",
+                LispAddressStringifier.getString(authenticationKey.getLispAddressContainer(),
+                authenticationKey.getMaskLength()), authenticationKey.getAuthkey());
 
         InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
-                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+                .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer(),
+                        authenticationKey.getMaskLength());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.put(LogicalDatastoreType.CONFIGURATION, path, authenticationKey, true);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
@@ -102,11 +105,11 @@ public class DataStoreBackEnd {
     }
 
     public void updateMapping(Mapping mapping) {
-        LOG.debug("MD-SAL: Updating mapping for {}/{}",
-                LispAFIConvertor.toString(mapping.getLispAddressContainer()), mapping.getMaskLength());
+        LOG.debug("MD-SAL: Updating mapping for {}",
+                LispAddressStringifier.getString(mapping.getLispAddressContainer(), mapping.getMaskLength()));
 
         InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
-                .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+                .createMappingIid(mapping.getLispAddressContainer(), mapping.getMaskLength(), mapping.getOrigin());
         WriteTransaction transaction = broker.newWriteOnlyTransaction();
         transaction.put(LogicalDatastoreType.CONFIGURATION, path, mapping, true);
         CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
index c708d1a0e572b4a484e1c9cff9d7ec6a5e21b170..f06dfea22195521c40fb4deaadc3cb45998580f1 100644 (file)
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.BooleanUtils;
 import org.opendaylight.lispflowmapping.implementation.serializer.address.LispAddressSerializer;
 import org.opendaylight.lispflowmapping.implementation.util.ByteUtil;
 import org.opendaylight.lispflowmapping.implementation.util.LispAFIConvertor;
+import org.opendaylight.lispflowmapping.implementation.util.LispAddressStringifier;
 import org.opendaylight.lispflowmapping.implementation.util.NumberUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.LispAFIAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.LispAddressContainer;
@@ -44,7 +45,7 @@ public class LocatorRecordSerializer {
         LispAFIAddress afiAddress = LispAddressSerializer.getInstance().deserialize(buffer);
         LispAddressContainer locator = LispAFIConvertor.toContainer(afiAddress);
         builder.setLispAddressContainer(locator);
-        builder.setName(LispAFIConvertor.toString(locator));
+        builder.setName(LispAddressStringifier.getString(locator));
         return builder.build();
     }
 
index a6419f57cd05bcc4d5f76b6ed09cfcadd4b1c744..544f50ef89440377990ce8497bfe81f9b1a1f1c4 100644 (file)
@@ -32,20 +32,20 @@ import com.google.common.base.Preconditions;
  *
  */
 public class InstanceIdentifierUtil {
-    public static InstanceIdentifier<AuthenticationKey> createAuthenticationKeyIid(LispAddressContainer eid) {
+    public static InstanceIdentifier<AuthenticationKey> createAuthenticationKeyIid(LispAddressContainer eid, int mask) {
         Preconditions.checkNotNull(eid, "Key needs and EID entry!");
 
         InstanceIdKey iidKey = new InstanceIdKey(new IidUri(Long.toString(getLispInstanceId(eid))));
-        AuthenticationKeyKey authKeyKey = new AuthenticationKeyKey(new EidUri(getAddressString(eid)));
+        AuthenticationKeyKey authKeyKey = new AuthenticationKeyKey(new EidUri(getURIAddressString(eid, mask)));
         return InstanceIdentifier.create(MappingDatabase.class)
                 .child(InstanceId.class, iidKey).child(AuthenticationKey.class, authKeyKey);
     }
 
-    public static InstanceIdentifier<Mapping> createMappingIid(LispAddressContainer eid, MappingOrigin orig) {
+    public static InstanceIdentifier<Mapping> createMappingIid(LispAddressContainer eid, int mask, MappingOrigin orig) {
         Preconditions.checkNotNull(eid, "Mapping needs an EID entry!");
 
         InstanceIdKey iidKey = new InstanceIdKey(new IidUri(Long.toString(getLispInstanceId(eid))));
-        MappingKey eidKey = new MappingKey(new EidUri(getAddressString(eid)), orig);
+        MappingKey eidKey = new MappingKey(new EidUri(getURIAddressString(eid, mask)), orig);
         return InstanceIdentifier.create(MappingDatabase.class)
                 .child(InstanceId.class, iidKey).child(Mapping.class, eidKey);
     }
@@ -58,7 +58,7 @@ public class InstanceIdentifierUtil {
         return 0L;
     }
 
-    private static String getAddressString(LispAddressContainer container) {
-        return LispAFIConvertor.toString(container);
+    private static String getURIAddressString(LispAddressContainer container, int mask) {
+        return LispAddressStringifier.getURIString(container, mask);
     }
 }
index df3bce84691e5e79b1a8ed620f8bff69d743e754..4c9b607e22f4f24244f6cc45734e904acd68463f 100644 (file)
@@ -322,90 +322,4 @@ public class LispAFIConvertor {
                 .setAfi((short) AddressFamilyNumberEnum.IP6.getIanaCode())
                 .build();
     }
-
-    public static String toString(LispAddressContainer container) {
-        Address address = container.getAddress();
-
-        if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv4) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv4) address)
-                    .getIpv4Address().getIpv4Address().getValue();
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv6) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv6) address)
-                    .getIpv6Address().getIpv6Address().getValue();
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSegment) {
-            PrimitiveAddress addr = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSegment) address)
-                    .getLcafSegmentAddr().getAddress().getPrimitiveAddress();
-            return LispAFIConvertor.toString(addr);
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSourceDest) {
-            LcafSourceDestAddr srcDstAddr = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSourceDest) address)
-                    .getLcafSourceDestAddr();
-            return ("SrcDst:" + toString(srcDstAddr.getSrcAddress().getPrimitiveAddress())
-                    + "-" + srcDstAddr.getSrcMaskLength()
-                    + ":" + toString(srcDstAddr.getDstAddress().getPrimitiveAddress())
-                    + "-" + srcDstAddr.getDstMaskLength());
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafApplicationData) {
-            LcafApplicationDataAddr appData = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafApplicationData) address)
-                    .getLcafApplicationDataAddr();
-            return ("AppData:" + toString(appData.getAddress().getPrimitiveAddress()) + ":"
-                    + appData.getProtocol() + ":" + appData.getIpTos() + ":"
-                    + appData.getLocalPortLow() + "-" + appData.getLocalPortHigh() + ":"
-                    + appData.getRemotePortLow() + "-" + appData.getRemotePortHigh());
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafKeyValue) {
-            PrimitiveAddress key = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafKeyValue) address)
-                    .getLcafKeyValueAddressAddr().getKey()
-                    .getPrimitiveAddress();
-            PrimitiveAddress value = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafKeyValue) address)
-                    .getLcafKeyValueAddressAddr().getValue()
-                    .getPrimitiveAddress();
-            return (toString(key) + ":" + toString(value));
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.DistinguishedName) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.DistinguishedName) address)
-                    .getDistinguishedName().getDistinguishedName();
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Mac) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Mac) address)
-                    .getMacAddress().getMacAddress().getValue();
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.No) {
-            return "NoAddress";
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.AS) {
-            return ("AS" + ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.AS) address).getAS().getAS());
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafTrafficEngineering) {
-            List<Hops> hops = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafTrafficEngineering) address)
-                    .getLcafTrafficEngineeringAddr().getHops();
-            StringBuilder sb = new StringBuilder("ELP");
-            for (Hops hop : hops) {
-                sb.append(":");
-                sb.append(toString(hop.getHop().getPrimitiveAddress()));
-            }
-            return sb.toString();
-        } else if (address instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafList) {
-            List<Addresses> addresses = ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafList) address)
-                    .getLcafListAddr().getAddresses();
-            StringBuilder sb = new StringBuilder("AddressList");
-            for (Addresses addr : addresses) {
-                sb.append(":");
-                sb.append(toString(addr.getPrimitiveAddress()));
-            }
-            return sb.toString();
-        }
-
-        return null;
-    }
-
-    public static String toString(PrimitiveAddress primitive) {
-
-        if (primitive instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv4) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv4) primitive)
-                    .getIpv4Address().getIpv4Address().getValue();
-        }
-        if (primitive instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv6) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv6) primitive)
-                    .getIpv6Address().getIpv6Address().getValue();
-        }
-        if (primitive instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Mac) {
-            return ((org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Mac) primitive)
-                    .getMacAddress().getMacAddress().getValue();
-        }
-
-        return null;
-    }
 }
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispAddressStringifier.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispAddressStringifier.java
new file mode 100644 (file)
index 0000000..4c3c6c7
--- /dev/null
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.lispflowmapping.implementation.util;
+
+import java.util.List;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lcaflistaddress.Addresses;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lcaftrafficengineeringaddress.Hops;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.LispAddressContainer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.AS;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.DistinguishedName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafApplicationData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafKeyValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSegment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafSourceDest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.LcafTrafficEngineering;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.Mac;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.No;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.lcafapplicationdata.LcafApplicationDataAddr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.lcafkeyvalue.LcafKeyValueAddressAddr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.lispaddresscontainer.address.lcafsourcedest.LcafSourceDestAddr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.PrimitiveAddress;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * Utility class with static methods returning string representations of
+ * supported LISP address types, both for use in URLs and for user friendly
+ * output.
+ *
+ * @author Lorand Jakab
+ *
+ */
+public class LispAddressStringifier {
+
+    private static final String PREFIX_SEPARATOR = ":";
+    /*
+     * In the unlikely event that a AFI 0 address is used a key, we use a
+     * sequence number to ensure uniqueness
+     */
+    protected static int noAddrSeq = 0;
+    /*
+     * There are three possible destinations for rendering an address as a
+     * string:
+     *
+     *   * General user interaction, like log and CLI output, GUI
+     *     representation, etc.
+     *   * As a URI string that is the entry key in the MD-SAL datastore
+     *   * As a URL string that is the same as the URI string, except for
+     *     characters not accepted in URLs are percent encoded (e.g. '/' is
+     *     encoded as '%2f'
+     */
+    protected enum Destination {
+        USER,
+        URI,
+        URL;
+    }
+
+    public static String getString(LispAddressContainer container) {
+        return getString(Destination.USER, container);
+    }
+
+    public static String getString(LispAddressContainer container, int mask) {
+        return getString(Destination.USER, container, mask);
+    }
+
+    public static String getURIString(LispAddressContainer container, int mask) {
+        return getString(Destination.URI, container, mask);
+    }
+
+    public static String getURLString(LispAddressContainer container, int mask) {
+        return getString(Destination.URL, container, mask);
+    }
+
+    private static String getString(Destination dst, LispAddressContainer container) {
+        Preconditions.checkNotNull(container, "address should not be null");
+        Address addr = container.getAddress();
+        String prefix = null;
+        String address = null;
+
+        if (addr instanceof Ipv4) {
+            prefix = "ipv4" + PREFIX_SEPARATOR;
+            address = getStringFromIpv4(dst, (Ipv4) addr);
+        } else if (addr instanceof Ipv6) {
+            prefix = "ipv6" + PREFIX_SEPARATOR;
+            address = getStringFromIpv6(dst, (Ipv6) addr);
+        } else if (addr instanceof Mac) {
+            prefix = "mac" + PREFIX_SEPARATOR;
+            address = getStringFromMac(dst, (Mac) addr);
+        } else if (addr instanceof LcafSegment) {
+            PrimitiveAddress pa = ((LcafSegment) addr).getLcafSegmentAddr().getAddress().getPrimitiveAddress();
+            // Instance ID is a separate parent hierarchy, so we use the simple address prefix
+            prefix = LispPrimitiveAddressStringifier.getURLPrefix(pa) + PREFIX_SEPARATOR;
+            address = getStringFromLcafSegment(dst, (LcafSegment) addr);
+        } else if (addr instanceof No) {
+            prefix = "no" + PREFIX_SEPARATOR;
+            address = getStringFromNo(dst, (No) addr);
+        } else if (addr instanceof DistinguishedName) {
+            prefix = "dn" + PREFIX_SEPARATOR;
+            address = getStringFromDistinguishedName(dst, (DistinguishedName) addr);
+        } else if (addr instanceof AS) {
+            prefix = "as" + PREFIX_SEPARATOR;
+            address = getStringFromAS(dst, (AS) addr);
+        } else if (addr instanceof LcafList) {
+            prefix = "list" + PREFIX_SEPARATOR;
+            address = getStringFromLcafList(dst, (LcafList) addr);
+        } else if (addr instanceof LcafApplicationData) {
+            prefix = "appdata" + PREFIX_SEPARATOR;
+            address = getStringFromLcafApplicationData(dst, (LcafApplicationData) addr);
+        } else if (addr instanceof LcafTrafficEngineering) {
+            prefix = "elp" + PREFIX_SEPARATOR;
+            address = getStringFromLcafTrafficEngineering(dst, (LcafTrafficEngineering) addr);
+        } else if (addr instanceof LcafSourceDest) {
+            prefix = "srcdst" + PREFIX_SEPARATOR;
+            address = getStringFromLcafSourceDest(dst, (LcafSourceDest) addr);
+        } else if (addr instanceof LcafKeyValue) {
+            prefix = "kv" + PREFIX_SEPARATOR;
+            address = getStringFromLcafKeyValue(dst, (LcafKeyValue) addr);
+        }
+
+        if (dst == Destination.USER) {
+            return address;
+        } else {
+            return prefix + address;
+        }
+
+    }
+
+    private static String getString(Destination dst, LispAddressContainer container, int mask) {
+        Address addr = container.getAddress();
+
+        if (isMaskable(addr)) {
+            return (getString(dst, container) + getMaskSeparator(dst) + mask);
+        } else {
+            return getString(dst, container);
+        }
+    }
+
+    private static boolean isMaskable(Address addr) {
+        if (addr instanceof Ipv4 || addr instanceof Ipv6 || addr instanceof LcafSegment) {
+            return true;
+        }
+        return false;
+    }
+
+    private static String getMaskSeparator(Destination dst) {
+        if (dst == Destination.URL) {
+            return "%2f";
+        } else {
+            return "/";
+        }
+    }
+
+    protected static String getStringFromNo(Destination dst, No addr) {
+        // AFI = 0
+        if (dst == Destination.USER) {
+            return "No Address Present";
+        } else {
+            return "" + noAddrSeq++;
+        }
+    }
+
+    protected static String getStringFromIpv4(Destination dst, Ipv4 addr) {
+        // AFI = 1; IPv4
+        return addr.getIpv4Address().getIpv4Address().getValue();
+    }
+
+    protected static String getStringFromIpv6(Destination dst, Ipv6 addr) {
+        // AFI = 2; IPv6
+        return addr.getIpv6Address().getIpv6Address().getValue();
+    }
+
+    protected static String getStringFromDistinguishedName(Destination dst, DistinguishedName addr) {
+        // AFI = 17; Distinguished Name
+        return addr.getDistinguishedName().getDistinguishedName();
+    }
+
+    protected static String getStringFromAS(Destination dst, AS addr) {
+        // AFI = 18; Autonomous System Number
+        return "AS" + addr.getAS().getAS();
+    }
+    protected static String getStringFromLcafList(Destination dst, LcafList addr) {
+        // AFI 16387, LCAF Type 1; Address List
+        // Example rendering:
+        //    {192.0.2.1,192.0.2.2,2001:db8::1}
+        List<Addresses> addresses = addr.getLcafListAddr().getAddresses();
+        StringBuilder sb = new StringBuilder("{");
+        boolean needComma = false;
+        for (Addresses a : addresses) {
+            if (needComma) {
+                sb.append(",");
+            }
+            sb.append(LispPrimitiveAddressStringifier.getString(dst, a.getPrimitiveAddress()));
+            needComma = true;
+        }
+        sb.append("}");
+        return sb.toString();
+    }
+
+    protected static String getStringFromLcafSegment(Destination dst, LcafSegment addr) {
+        // AFI = 16387, LCAF Type 2; Instance ID
+        // Example rendering:
+        //    [223] 192.0.2.0/24
+        PrimitiveAddress pa = addr.getLcafSegmentAddr().getAddress().getPrimitiveAddress();
+        if (dst == Destination.USER) {
+            return "[" + addr.getLcafSegmentAddr().getInstanceId() + "] "
+                    + LispPrimitiveAddressStringifier.getString(dst, pa);
+        } else {
+            return LispPrimitiveAddressStringifier.getString(dst, pa);
+        }
+    }
+
+    protected static String getStringFromLcafApplicationData(Destination dst, LcafApplicationData addr) {
+        // AFI = 16387, LCAF Type 4; Application Data
+        // Example rendering:
+        //    192.0.2.1!128!17!80-81!6667-7000
+        LcafApplicationDataAddr a = addr.getLcafApplicationDataAddr();
+        return LispPrimitiveAddressStringifier.getString(dst, a.getAddress().getPrimitiveAddress())
+                + "!" + a.getIpTos() + "!" + a.getProtocol()
+                + "!" + a.getLocalPortLow() + "-" + a.getLocalPortHigh()
+                + "!" + a.getRemotePortLow() + "-" + a.getRemotePortHigh();
+
+    }
+    protected static String getStringFromLcafTrafficEngineering(Destination dst, LcafTrafficEngineering addr) {
+        // AFI = 16387, LCAF Type 10, Explicit Locator Path
+        // Example rendering:
+        //    {192.0.2.1->192.0.2.2|lps->192.0.2.3}
+        List<Hops> hops = addr.getLcafTrafficEngineeringAddr().getHops();
+        StringBuilder sb = new StringBuilder();
+        sb.append("{");
+        boolean needArrow = false;
+        for (Hops hop : hops) {
+            if (needArrow) {
+                sb.append("->");
+            }
+            sb.append(LispPrimitiveAddressStringifier.getString(dst, hop.getHop().getPrimitiveAddress()));
+            if (hop.isLookup() || hop.isRLOCProbe() || hop.isStrict()) {
+                sb.append("|");
+            }
+            if (hop.isLookup()) {
+                sb.append("l");
+            }
+            if (hop.isRLOCProbe()) {
+                sb.append("p");
+            }
+            if (hop.isStrict()) {
+                sb.append("s");
+            }
+            needArrow = true;
+        }
+        sb.append("}");
+        return sb.toString();
+    }
+
+    protected static String getStringFromLcafSourceDest(Destination dst, LcafSourceDest addr) {
+        // AFI = 16387, LCAF Type 12, Source/Destination Key
+        // Example rendering:
+        //    192.0.2.1/32|192.0.2.2/32
+        LcafSourceDestAddr a = ((LcafSourceDest) addr).getLcafSourceDestAddr();
+        return LispPrimitiveAddressStringifier.getString(dst, a.getSrcAddress().getPrimitiveAddress())
+                + getMaskSeparator(dst) + a.getSrcMaskLength() + "|"
+                + LispPrimitiveAddressStringifier.getString(dst, a.getDstAddress().getPrimitiveAddress())
+                + getMaskSeparator(dst) + a.getDstMaskLength();
+    }
+
+    protected static String getStringFromLcafKeyValue(Destination dst, LcafKeyValue addr) {
+        // AFI = 16387, LCAF Type 15, Key/Value Address Pair
+        // Example rendering:
+        //    192.0.2.1=>192.0.2.2
+        LcafKeyValueAddressAddr a = addr.getLcafKeyValueAddressAddr();
+        return LispPrimitiveAddressStringifier.getString(dst, a.getKey().getPrimitiveAddress()) + "=>"
+                + LispPrimitiveAddressStringifier.getString(dst, a.getValue().getPrimitiveAddress());
+    }
+
+    protected static String getStringFromMac(Destination dst, Mac addr) {
+        // AFI = 16389; MAC
+        return addr.getMacAddress().getMacAddress().getValue();
+    }
+
+}
index 398e362388f60d836f17e416d0d7145a9f66fdae..106c38763ea924273df6fc63e401b7ce18e8ae49 100644 (file)
@@ -134,7 +134,8 @@ public class LispNotificationHelper {
         for (int i=0; i<mapRegisterNotification.getMapRegister().getEidToLocatorRecord().size(); i++) {
             EidToLocatorRecord record = mapRegisterNotification.getMapRegister().getEidToLocatorRecord().get(i);
             MappingBuilder mb = new MappingBuilder();
-            mb.setEid(new EidUri(LispAFIConvertor.toString(record.getLispAddressContainer())));
+            mb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                    record.getLispAddressContainer(), record.getMaskLength())));
             mb.setOrigin(MappingOrigin.Southbound);
             mb.setRecordTtl(record.getRecordTtl());
             mb.setMaskLength(record.getMaskLength());
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispPrimitiveAddressStringifier.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispPrimitiveAddressStringifier.java
new file mode 100644 (file)
index 0000000..a238ab0
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.lispflowmapping.implementation.util;
+
+import org.opendaylight.lispflowmapping.implementation.util.LispAddressStringifier.Destination;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.PrimitiveAddress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.AS;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.DistinguishedName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.Mac;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispsimpleaddress.primitiveaddress.No;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * Utility class with static methods returning string representations of
+ * supported LISP simple address types
+ *
+ * @author Lorand Jakab
+ *
+ */
+public class LispPrimitiveAddressStringifier {
+
+    public static String getString(PrimitiveAddress addr) {
+        return getString(Destination.USER, addr);
+    }
+
+    public static String getString(Destination dst, PrimitiveAddress addr) {
+        Preconditions.checkNotNull(addr, "address should not be null");
+
+        if (addr instanceof Ipv4) {
+            return ((Ipv4) addr).getIpv4Address().getIpv4Address().getValue();
+        } else if (addr instanceof Ipv6) {
+            return ((Ipv6) addr).getIpv6Address().getIpv6Address().getValue();
+        } else if (addr instanceof Mac) {
+            return ((Mac) addr).getMacAddress().getMacAddress().getValue();
+        } else if (addr instanceof DistinguishedName) {
+            return ((DistinguishedName) addr).getDistinguishedNameAddress().getDistinguishedName();
+        } else if (addr instanceof AS) {
+            return "AS" + ((AS) addr).getASAddress().getAS();
+        } else if (addr instanceof No) {
+            if (dst == Destination.USER) {
+                return "No Address Present";
+            } else {
+                return "" + LispAddressStringifier.noAddrSeq++;
+            }
+        }
+
+        return null;
+    }
+
+    protected static String getURLPrefix(PrimitiveAddress addr) {
+        Preconditions.checkNotNull(addr, "address should not be null");
+
+        if (addr instanceof Ipv4) {
+            return "ipv4";
+        } else if (addr instanceof Ipv6) {
+            return "ipv6";
+        } else if (addr instanceof Mac) {
+            return "mac";
+        } else if (addr instanceof DistinguishedName) {
+            return "dn";
+        } else if (addr instanceof AS) {
+            return "as";
+        } else if (addr instanceof No) {
+            return "no";
+        }
+
+        return null;
+    }
+
+}
index 66c6f60faccbf4f109a04ab35233a6960e48ffcd..b0294fe0492b328995a73b536af637c4ea43c9ba 100644 (file)
@@ -29,7 +29,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150
 public class RPCInputConvertorUtil {
     public static AuthenticationKey toAuthenticationKey(AddKeyInput input) {
         AuthenticationKeyBuilder akb = new AuthenticationKeyBuilder();
-        akb.setEid(new EidUri(LispAFIConvertor.toString(input.getLispAddressContainer())));
+        akb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getLispAddressContainer(), input.getMaskLength())));
         akb.setLispAddressContainer(input.getLispAddressContainer());
         akb.setMaskLength(input.getMaskLength());
         akb.setKeyType(input.getKeyType());
@@ -39,7 +40,8 @@ public class RPCInputConvertorUtil {
 
     public static AuthenticationKey toAuthenticationKey(UpdateKeyInput input) {
         AuthenticationKeyBuilder akb = new AuthenticationKeyBuilder();
-        akb.setEid(new EidUri(LispAFIConvertor.toString(input.getEid().getLispAddressContainer())));
+        akb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getEid().getLispAddressContainer(), input.getEid().getMaskLength())));
         akb.setLispAddressContainer(input.getEid().getLispAddressContainer());
         akb.setMaskLength(input.getEid().getMaskLength());
         akb.setKeyType(input.getKey().getKeyType());
@@ -49,7 +51,8 @@ public class RPCInputConvertorUtil {
 
     public static AuthenticationKey toAuthenticationKey(RemoveKeyInput input) {
         AuthenticationKeyBuilder akb = new AuthenticationKeyBuilder();
-        akb.setEid(new EidUri(LispAFIConvertor.toString(input.getLispAddressContainer())));
+        akb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getLispAddressContainer(), input.getMaskLength())));
         akb.setLispAddressContainer(input.getLispAddressContainer());
         akb.setMaskLength(input.getMaskLength());
         return akb.build();
@@ -57,7 +60,8 @@ public class RPCInputConvertorUtil {
 
     public static Mapping toMapping(AddMappingInput input) {
         MappingBuilder mb = new MappingBuilder();
-        mb.setEid(new EidUri(LispAFIConvertor.toString(input.getLispAddressContainer())));
+        mb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getLispAddressContainer(), input.getMaskLength())));
         mb.setOrigin(MappingOrigin.Northbound);
         mb.setRecordTtl(input.getRecordTtl());
         mb.setMaskLength(input.getMaskLength());
@@ -71,7 +75,8 @@ public class RPCInputConvertorUtil {
 
     public static Mapping toMapping(UpdateMappingInput input) {
         MappingBuilder mb = new MappingBuilder();
-        mb.setEid(new EidUri(LispAFIConvertor.toString(input.getLispAddressContainer())));
+        mb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getLispAddressContainer(), input.getMaskLength())));
         mb.setOrigin(MappingOrigin.Northbound);
         mb.setRecordTtl(input.getRecordTtl());
         mb.setMaskLength(input.getMaskLength());
@@ -85,7 +90,8 @@ public class RPCInputConvertorUtil {
 
     public static Mapping toMapping(RemoveMappingInput input) {
         MappingBuilder mb = new MappingBuilder();
-        mb.setEid(new EidUri(LispAFIConvertor.toString(input.getLispAddressContainer())));
+        mb.setEid(new EidUri(LispAddressStringifier.getURIString(
+                input.getLispAddressContainer(), input.getMaskLength())));
         mb.setOrigin(MappingOrigin.Northbound);
         mb.setMaskLength(input.getMaskLength());
         mb.setLispAddressContainer(input.getLispAddressContainer());
index 29fb5d45e09785db7138f1fe06ff8402ca052bd1..8b78e5977ed5e70d5d881c5dc92bcbe8c20b18e8 100644 (file)
@@ -3,26 +3,76 @@
        "name": "lfm RESTCONF",
        "description": "",
        "order": [
+               "85ba8251-4998-532a-4c4b-611b30974599",
+               "dbcd9153-6022-c297-0154-bfa15d8b6872",
+               "9342710c-03ab-7494-909a-5e3e9a6cfc55",
                "a3fc8671-d7ab-9276-6e09-e62939e330dc",
                "af40d48c-cc5e-bedd-a92f-c0b433e3928e",
                "fe7ae219-42c0-6cb4-ffb5-7badb8af5738",
                "be974822-7f0b-ac92-35af-1aac8cadc7ac",
                "d43cc55e-bcc7-bdce-1673-4ba2d1c92f2c",
                "f317f5ca-1bac-2f87-5d9f-c165d127bdf6",
-               "85ba8251-4998-532a-4c4b-611b30974599",
-               "dbcd9153-6022-c297-0154-bfa15d8b6872",
-               "9342710c-03ab-7494-909a-5e3e9a6cfc55"
+               "2c1b7cac-a60a-3698-32fe-6c29bda5b8a7",
+               "135e122f-af86-1494-7fe2-c4c58dd41f3a",
+               "e4f03542-2d58-9a77-f59b-1518e3e2bce9",
+               "a38cd195-f904-5160-7bc2-4fbfa01e16d4",
+               "fb4658dc-9ba9-3110-9fb3-9e69f30d292a",
+               "a3d74340-9293-3faa-ff5f-c655bcc7be12",
+               "8d19a093-57fb-9c07-0d36-9c211fd0b654"
        ],
        "folders": [],
        "timestamp": 1429906322387,
-       "synced": false,
        "owner": 0,
-       "sharedWithTeam": false,
-       "subscribed": false,
        "remoteLink": "",
        "public": false,
-       "write": true,
+       "createdAt": null,
+       "updatedAt": null,
+       "synced": false,
        "requests": [
+               {
+                       "id": "135e122f-af86-1494-7fe2-c4c58dd41f3a",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/mac:00:11:22:33:44:55/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "method": "PUT",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "data": [],
+                       "dataMode": "raw",
+                       "name": "Add/update MAC key",
+                       "description": "",
+                       "descriptionFormat": "html",
+                       "time": 1432818580435,
+                       "version": 2,
+                       "responses": [],
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "collectionOwner": 0,
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"mac:00:11:22:33:44:55\",\n        \"LispAddressContainer\": {\n            \"MacAddress\": {\n                \"afi\": 16389,\n                \"MacAddress\": \"00:11:22:33:44:55\"\n            }\n        },\n        \"mask-length\": 0,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
+               {
+                       "id": "2c1b7cac-a60a-3698-32fe-6c29bda5b8a7",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/ipv6:2001:db8::1%2f128/",
+                       "preRequestScript": "",
+                       "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1432818542796,
+                       "name": "Add/update IPv6 key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"ipv6:2001:db8::1/128\",\n        \"LispAddressContainer\": {\n            \"Ipv6Address\": {\n                \"afi\": 2,\n                \"Ipv6Address\": \"2001:db8::1\"\n            }\n        },\n        \"mask-length\": 128,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
                {
                        "id": "85ba8251-4998-532a-4c4b-611b30974599",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "time": 1430171249428,
-                       "name": "Add/update multiple",
+                       "time": 1432815035076,
+                       "name": "Add/update multiple keys/mappings",
                        "description": "Overwrites everything",
                        "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "responses": [],
                        "synced": false,
-                       "rawModeData": "{\n    \"mapping-database\": {\n        \"instance-id\": [{\n            \"iid\":\"0\",\n            \"authentication-key\": {\n                \"eid\":\"192.0.2.1\",\n                \"authkey\":\"password\",\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\":1,\n                        \"Ipv4Address\":\"192.0.2.1\"\n                    }\n                },\n                \"key-type\":1,\n                \"mask-length\":32\n            },\n            \"mapping\": {\n                \"eid\": \"192.0.2.1\",\n                \"origin\": \"northbound\",\n                \"recordTtl\": 1440,\n                \"maskLength\": 32,\n                \"authoritative\": true,\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\": 1,\n                        \"Ipv4Address\": \"192.0.2.1\"\n                    }\n                },\n                \"LocatorRecord\": [\n                    {\n                        \"name\": \"ISP1\",\n                        \"priority\": 1,\n                        \"weight\": 1,\n                        \"multicastPriority\": 255,\n                        \"multicastWeight\": 0,\n                        \"localLocator\": true,\n                        \"rlocProbed\": false,\n                        \"routed\": false,\n                        \"LispAddressContainer\": {\n                            \"Ipv4Address\": {\n                                \"afi\": 1,\n                                \"Ipv4Address\": \"10.10.10.10\"\n                            }\n                        }\n                    }\n                ]\n            }\n        },\n        {\n            \"iid\":\"1\",\n            \"authentication-key\": {\n                \"eid\":\"192.0.2.2\",\n                \"authkey\":\"password-iid1\",\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\":1,\n                        \"Ipv4Address\":\"192.0.2.2\"\n                    }\n                },\n                \"key-type\":1,\n                \"mask-length\":32\n            }\n        }]\n    }\n}"
+                       "rawModeData": "{\n    \"mapping-database\": {\n        \"instance-id\": [{\n            \"iid\":\"0\",\n            \"authentication-key\": {\n                \"eid\":\"ipv4:192.0.2.1/32\",\n                \"authkey\":\"password\",\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\":1,\n                        \"Ipv4Address\":\"192.0.2.1\"\n                    }\n                },\n                \"key-type\":1,\n                \"mask-length\":32\n            },\n            \"mapping\": {\n                \"eid\": \"ipv4:192.0.2.1/32\",\n                \"origin\": \"northbound\",\n                \"recordTtl\": 1440,\n                \"maskLength\": 32,\n                \"authoritative\": true,\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\": 1,\n                        \"Ipv4Address\": \"192.0.2.1\"\n                    }\n                },\n                \"LocatorRecord\": [\n                    {\n                        \"name\": \"ISP1\",\n                        \"priority\": 1,\n                        \"weight\": 1,\n                        \"multicastPriority\": 255,\n                        \"multicastWeight\": 0,\n                        \"localLocator\": true,\n                        \"rlocProbed\": false,\n                        \"routed\": false,\n                        \"LispAddressContainer\": {\n                            \"Ipv4Address\": {\n                                \"afi\": 1,\n                                \"Ipv4Address\": \"10.10.10.10\"\n                            }\n                        }\n                    }\n                ]\n            }\n        },\n        {\n            \"iid\":\"1\",\n            \"authentication-key\": {\n                \"eid\":\"ipv4:192.0.2.2/32\",\n                \"authkey\":\"password-iid1\",\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\":1,\n                        \"Ipv4Address\":\"192.0.2.2\"\n                    }\n                },\n                \"key-type\":1,\n                \"mask-length\":32\n            }\n        }]\n    }\n}"
+               },
+               {
+                       "id": "8d19a093-57fb-9c07-0d36-9c211fd0b654",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/1/authentication-key/kv:192.0.2.1=>192.0.2.2/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "method": "PUT",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "data": [],
+                       "dataMode": "raw",
+                       "name": "Add/update Key/Value Address key",
+                       "description": "",
+                       "descriptionFormat": "html",
+                       "time": 1432837342648,
+                       "version": 2,
+                       "responses": [],
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "collectionOwner": 0,
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"kv:192.0.2.1=>192.0.2.2\",\n        \"LispAddressContainer\": {\n            \"LcafKeyValueAddressAddr\": {\n                \"afi\": 16387,\n                \"lcafType\": 15,\n                \"key\": {\n                    \"Ipv4Address\": {\n                        \"Ipv4Address\": \"192.0.2.1\",\n                        \"afi\": 1\n                    }\n                },\n                \"value\": {\n                    \"Ipv4Address\": {\n                        \"Ipv4Address\": \"192.0.2.2\",\n                        \"afi\": 1\n                    }\n                }\n            }\n        },\n        \"mask-length\": 0,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
                },
                {
                        "id": "9342710c-03ab-7494-909a-5e3e9a6cfc55",
                        "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Delete ALL",
+                       "name": "Delete ALL database content",
                        "description": "",
                        "descriptionFormat": "html",
                        "time": 1430169139026,
                        "synced": false
                },
                {
-                       "id": "a3fc8671-d7ab-9276-6e09-e62939e330dc",
+                       "id": "a38cd195-f904-5160-7bc2-4fbfa01e16d4",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/192.0.2.1/",
-                       "pathVariables": {},
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/as:AS64500/",
                        "preRequestScript": "",
+                       "pathVariables": {},
                        "method": "PUT",
-                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "raw",
-                       "name": "Add/update key",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1432820339686,
+                       "name": "Add/update AS Number key",
                        "description": "",
-                       "descriptionFormat": "html",
-                       "time": 1430152994477,
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"as:AS64500\",\n        \"LispAddressContainer\": {\n            \"AS\": {\n                \"afi\": 18,\n                \"AS\": 64500\n            }\n        },\n        \"mask-length\": 0,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
+               {
+                       "id": "a3d74340-9293-3faa-ff5f-c655bcc7be12",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/1/authentication-key/srcdst:192.0.2.1%2f32|192.0.2.2%2f32/",
+                       "preRequestScript": "",
+                       "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
                        "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1432837355011,
+                       "name": "Add/update Source/Dest key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "responses": [],
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"srcdst:192.0.2.1/32|192.0.2.2/32\",\n        \"LispAddressContainer\": {\n            \"LcafSourceDestAddr\": {\n                \"afi\": 16387,\n                \"lcafType\": 12,\n                \"srcAddress\": {\n                    \"Ipv4Address\": {\n                        \"Ipv4Address\": \"192.0.2.1\",\n                        \"afi\": 1\n                    }\n                },\n                \"srcMaskLength\": 32,\n                \"dstAddress\": {\n                    \"Ipv4Address\": {\n                        \"Ipv4Address\": \"192.0.2.2\",\n                        \"afi\": 1\n                    }\n                },\n                \"dstMaskLength\": 32\n            }\n        },\n        \"mask-length\": 0,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
+               {
+                       "id": "a3fc8671-d7ab-9276-6e09-e62939e330dc",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/ipv4:192.0.2.1%2f32/",
+                       "preRequestScript": "",
+                       "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "collectionOwner": 0,
+                       "time": 1432814786689,
+                       "name": "Add/update IPv4 key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
                        "synced": false,
-                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"192.0.2.1\",\n        \"LispAddressContainer\": {\n            \"Ipv4Address\": {\n                \"afi\": 1,\n                \"Ipv4Address\": \"192.0.2.1\"\n            }\n        },\n        \"mask-length\": 32,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"ipv4:192.0.2.1/32\",\n        \"LispAddressContainer\": {\n            \"Ipv4Address\": {\n                \"afi\": 1,\n                \"Ipv4Address\": \"192.0.2.1\"\n            }\n        },\n        \"mask-length\": 32,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
                },
                {
                        "id": "af40d48c-cc5e-bedd-a92f-c0b433e3928e",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/192.0.2.1/",
-                       "pathVariables": {},
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/ipv4:192.0.2.1%2f32/",
                        "preRequestScript": "",
+                       "pathVariables": {},
                        "method": "GET",
-                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Get key",
-                       "description": "",
-                       "descriptionFormat": "html",
-                       "time": 1430153166607,
                        "version": 2,
-                       "responses": [],
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "collectionOwner": 0,
+                       "time": 1432814805965,
+                       "name": "Get IPv4 key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
                        "synced": false
                },
                {
                        "id": "be974822-7f0b-ac92-35af-1aac8cadc7ac",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/192.0.2.1/northbound/",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/ipv4:192.0.2.1%2f32/northbound/",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "PUT",
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "time": 1430170504842,
-                       "name": "Add/update mapping",
+                       "time": 1432814875712,
+                       "name": "Add/update IPv4 mapping",
                        "description": "",
                        "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "responses": [],
                        "synced": false,
-                       "rawModeData": "{\n    \"mapping\": {\n        \"eid\": \"192.0.2.1\",\n        \"origin\": \"northbound\",\n        \"recordTtl\": 1440,\n        \"maskLength\": 32,\n        \"authoritative\": true,\n        \"LispAddressContainer\": {\n            \"Ipv4Address\": {\n                \"afi\": 1,\n                \"Ipv4Address\": \"192.0.2.1\"\n            }\n        },\n        \"LocatorRecord\": [\n            {\n                \"name\": \"ISP1\",\n                \"priority\": 1,\n                \"weight\": 1,\n                \"multicastPriority\": 255,\n                \"multicastWeight\": 0,\n                \"localLocator\": true,\n                \"rlocProbed\": false,\n                \"routed\": false,\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\": 1,\n                        \"Ipv4Address\": \"10.10.10.10\"\n                    }\n                }\n            }\n        ]\n   }\n}"
+                       "rawModeData": "{\n    \"mapping\": {\n        \"eid\": \"ipv4:192.0.2.1/32\",\n        \"origin\": \"northbound\",\n        \"recordTtl\": 1440,\n        \"maskLength\": 32,\n        \"authoritative\": true,\n        \"LispAddressContainer\": {\n            \"Ipv4Address\": {\n                \"afi\": 1,\n                \"Ipv4Address\": \"192.0.2.1\"\n            }\n        },\n        \"LocatorRecord\": [\n            {\n                \"name\": \"ISP1\",\n                \"priority\": 1,\n                \"weight\": 1,\n                \"multicastPriority\": 255,\n                \"multicastWeight\": 0,\n                \"localLocator\": true,\n                \"rlocProbed\": false,\n                \"routed\": false,\n                \"LispAddressContainer\": {\n                    \"Ipv4Address\": {\n                        \"afi\": 1,\n                        \"Ipv4Address\": \"10.10.10.10\"\n                    }\n                }\n            }\n        ]\n   }\n}"
                },
                {
                        "id": "d43cc55e-bcc7-bdce-1673-4ba2d1c92f2c",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/192.0.2.1/northbound/",
-                       "pathVariables": {},
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/ipv4:192.0.2.1%2f32/northbound/",
                        "preRequestScript": "",
+                       "pathVariables": {},
                        "method": "GET",
-                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Get mapping",
-                       "description": "",
-                       "descriptionFormat": "html",
-                       "time": 1430170536271,
                        "version": 2,
-                       "responses": [],
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "collectionOwner": 0,
+                       "time": 1432814926784,
+                       "name": "Get IPv4 mapping",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
                        "synced": false
                },
                {
                        "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Get ALL",
+                       "name": "Get ALL database content",
                        "description": "",
                        "descriptionFormat": "html",
                        "time": 1430168653088,
                        "synced": false
                },
                {
-                       "id": "f317f5ca-1bac-2f87-5d9f-c165d127bdf6",
+                       "id": "e4f03542-2d58-9a77-f59b-1518e3e2bce9",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/192.0.2.1/northbound/",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/dn:stringAsIs/",
+                       "preRequestScript": "",
                        "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1432820169790,
+                       "name": "Add/update DistinguishedName key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"dn:stringAsIs\",\n        \"LispAddressContainer\": {\n            \"distinguishedName\": {\n                \"afi\": 17,\n                \"distinguishedName\": \"stringAsIs\"\n            }\n        },\n        \"mask-length\": 0,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
+               {
+                       "id": "f317f5ca-1bac-2f87-5d9f-c165d127bdf6",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/mapping/ipv4:192.0.2.1%2f32/northbound/",
                        "preRequestScript": "",
+                       "pathVariables": {},
                        "method": "DELETE",
-                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Delete mapping",
-                       "description": "",
-                       "descriptionFormat": "html",
-                       "time": 1430170550643,
                        "version": 2,
-                       "responses": [],
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "collectionOwner": 0,
+                       "time": 1432814946053,
+                       "name": "Delete IPv4 mapping",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
                        "synced": false
                },
                {
-                       "id": "fe7ae219-42c0-6cb4-ffb5-7badb8af5738",
+                       "id": "fb4658dc-9ba9-3110-9fb3-9e69f30d292a",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/192.0.2.1/",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/1/authentication-key/ipv4:192.0.2.0%2f24/",
+                       "preRequestScript": "",
                        "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1432821478184,
+                       "name": "Add/update Instance ID 1 IPv4 key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
+                       "synced": false,
+                       "rawModeData": "{\n    \"authentication-key\": {\n        \"eid\": \"ipv4:192.0.2.0/24\",\n        \"LispAddressContainer\": {\n            \"LcafSegmentAddr\": {\n                \"afi\": 16387,\n                \"lcafType\": 2,\n                \"instanceId\": 1,\n                \"iidMaskLength\": 32,\n                \"Address\": {\n                    \"Ipv4Address\": {\n                        \"Ipv4Address\": \"192.0.2.0\",\n                        \"afi\": 1\n                    }\n                }\n            }\n        },\n        \"mask-length\": 24,\n        \"key-type\": 1,\n        \"authkey\": \"password\"\n    }\n}"
+               },
+               {
+                       "id": "fe7ae219-42c0-6cb4-ffb5-7badb8af5738",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/instance-id/0/authentication-key/ipv4:192.0.2.1%2f32/",
                        "preRequestScript": "",
+                       "pathVariables": {},
                        "method": "DELETE",
-                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
                        "data": [],
                        "dataMode": "params",
-                       "name": "Delete key",
-                       "description": "",
-                       "descriptionFormat": "html",
-                       "time": 1430153184005,
                        "version": 2,
-                       "responses": [],
                        "tests": "",
                        "currentHelper": "normal",
                        "helperAttributes": {},
-                       "collectionOwner": 0,
+                       "time": 1432814822566,
+                       "name": "Delete IPv4 key",
+                       "description": "",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "responses": [],
                        "synced": false
                }
        ]