Support adding RESTCONF data to DAO 82/19182/6
authorLorand Jakab <lojakab@cisco.com>
Wed, 29 Apr 2015 08:55:21 +0000 (11:55 +0300)
committerLorand Jakab <lojakab@cisco.com>
Thu, 30 Apr 2015 07:24:46 +0000 (10:24 +0300)
Change-Id: Ia31994d6d25891dfa7adedb62e785650ee733db8
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
mappingservice/implementation/pom.xml
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java [new file with mode: 0644]
mappingservice/implementation/src/main/resources/lfm_RESTCONF.json.postman_collection [new file with mode: 0644]

index aacdc64f28ee86ca4aa0137dcd8fc01dba94e15a..3b7b957268f84fbc2ba67b3a9a3f7bd5af5aec60 100644 (file)
               org.opendaylight.lispflowmapping.type.sbplugin,
               javax.crypto,
               javax.crypto.spec,
+              org.opendaylight.controller.md.sal.binding.api,
+              org.opendaylight.controller.md.sal.common.api.data,
               org.opendaylight.controller.sal.binding.api,
               org.opendaylight.yangtools.yang.binding,
               org.opendaylight.yangtools.yang.common,
index 6a50e129457adaa1f927a397356e61f9e2bbe94d..fed3d757ebc5865360aa5a360c2ce9a8f1d5a2aa 100644 (file)
@@ -14,6 +14,7 @@ import org.apache.commons.lang3.tuple.MutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
@@ -25,6 +26,8 @@ import org.opendaylight.lispflowmapping.implementation.dao.MappingServiceKeyUtil
 import org.opendaylight.lispflowmapping.implementation.dao.MappingServiceNoMaskKey;
 import org.opendaylight.lispflowmapping.implementation.lisp.MapResolver;
 import org.opendaylight.lispflowmapping.implementation.lisp.MapServer;
+import org.opendaylight.lispflowmapping.implementation.mdsal.AuthenticationKeyDataListener;
+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.LispNotificationHelper;
@@ -81,6 +84,8 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
 
     private static final ConfigIni configIni = new ConfigIni();
     private LfmMappingDatabaseRPCs rpc = new LfmMappingDatabaseRPCs();
+    private AuthenticationKeyDataListener keyListener;
+    private MappingDataListener mappingListener;
     private ILispDAO lispDao = null;
     private IMapResolverAsync mapResolver;
     private IMapServerAsync mapServer;
@@ -155,6 +160,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
         LOG.info("LISP (RFC6830) Mapping Service is destroyed!");
         mapResolver = null;
         mapServer = null;
+        closeDataListeners();
     }
 
     public void _removeEid(final CommandInterpreter ci) {
@@ -300,11 +306,22 @@ public class LispMappingService implements CommandProvider, IFlowMapping, IFlowM
         notificationService = session.getSALService(NotificationService.class);
         registerNotificationListener(AddMapping.class, new MapRegisterNotificationHandler());
         registerNotificationListener(RequestMapping.class, new MapRequestNotificationHandler());
+        registerDataListeners(session.getSALService(DataBroker.class));
         session.addRpcImplementation(LfmMappingDatabaseService.class, this);
         rpc.setLispMappingService(this);
         this.session = session;
     }
 
+    private void registerDataListeners(DataBroker broker) {
+        keyListener = new AuthenticationKeyDataListener(broker, this);
+        mappingListener = new MappingDataListener(broker, this);
+    }
+
+    private void closeDataListeners() {
+        keyListener.closeDataChangeListener();
+        mappingListener.closeDataChangeListener();
+    }
+
     public <T extends Notification> void registerNotificationListener(Class<T> notificationType, NotificationListener<T> listener) {
         notificationService.registerNotificationListener(notificationType, listener);
     }
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java
new file mode 100644 (file)
index 0000000..31319ec
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.mdsal;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+/**
+ * The superclass for the different MD-SAL data change event listeners.
+ *
+ * @author Lorand Jakab
+ *
+ */
+public abstract class AbstractDataListener implements DataChangeListener {
+    private DataBroker broker;
+    private InstanceIdentifier<?> path;
+    private ListenerRegistration<DataChangeListener> registration;
+
+    public void registerDataChangeListener() {
+        registration = broker.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
+                path, this, DataBroker.DataChangeScope.SUBTREE);
+    }
+
+    public void closeDataChangeListener() {
+        registration.close();
+    }
+
+    public void setBroker(DataBroker broker) {
+        this.broker = broker;
+    }
+
+    void setPath(InstanceIdentifier<?> path) {
+        this.path = path;
+    }
+}
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java
new file mode 100644 (file)
index 0000000..ecd3a94
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * 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.mdsal;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.lispflowmapping.implementation.LispMappingService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.MappingDatabase;
+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.mapping.database.InstanceId;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * DataListener for all AuthenticationKey modification events.
+ *
+ * @author Lorand Jakab
+ *
+ */
+public class AuthenticationKeyDataListener extends AbstractDataListener {
+    private static final Logger LOG = LoggerFactory.getLogger(AuthenticationKeyDataListener.class);
+    private LispMappingService msmr;
+
+    public AuthenticationKeyDataListener(DataBroker broker, LispMappingService msmr) {
+        setBroker(broker);
+        setMsmr(msmr);
+        setPath(InstanceIdentifier.create(MappingDatabase.class).child(InstanceId.class)
+                .child(AuthenticationKey.class));
+        LOG.trace("Registering AuthenticationKey listener.");
+        registerDataChangeListener();
+    }
+
+    @Override
+    public void onDataChanged(
+            AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
+
+        // Process newly created authentication keys
+        Map<InstanceIdentifier<?>, DataObject> createdData = change.getCreatedData();
+        for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : createdData.entrySet()) {
+            if (entry.getValue() instanceof AuthenticationKey) {
+                AuthenticationKey authkey = (AuthenticationKey)entry.getValue();
+
+                LOG.trace("Received created data");
+                LOG.trace("Key: {}", entry.getKey());
+                LOG.trace("Value: {}", authkey);
+
+                msmr.addAuthenticationKey(authkey.getLispAddressContainer(),
+                        authkey.getMaskLength(), authkey.getAuthkey());
+            }
+        }
+
+        // Process updated authentication keys
+        Map<InstanceIdentifier<?>, DataObject> updatedData = change.getUpdatedData();
+        for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : updatedData.entrySet()) {
+            if (entry.getValue() instanceof AuthenticationKey) {
+                AuthenticationKey authkey = (AuthenticationKey)entry.getValue();
+
+                LOG.trace("Received changed data");
+                LOG.trace("Key: {}", entry.getKey());
+                LOG.trace("Value: {}", authkey);
+
+                msmr.addAuthenticationKey(authkey.getLispAddressContainer(),
+                        authkey.getMaskLength(), authkey.getAuthkey());
+            }
+        }
+
+        // Process deleted authentication keys
+        Set<InstanceIdentifier<?>> removedData = change.getRemovedPaths();
+        for (InstanceIdentifier<?> entry : removedData) {
+            DataObject dataObject = change.getOriginalData().get(entry);
+            if (dataObject instanceof AuthenticationKey) {
+                AuthenticationKey authkey = (AuthenticationKey)dataObject;
+
+                LOG.trace("Received deleted data");
+                LOG.trace("Key: {}", entry);
+                LOG.trace("Value: {}", authkey);
+
+                msmr.removeAuthenticationKey(authkey.getLispAddressContainer(), authkey.getMaskLength());
+            }
+        }
+    }
+
+    void setMsmr(LispMappingService msmr) {
+        this.msmr = msmr;
+    }
+}
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java
new file mode 100644 (file)
index 0000000..122e05b
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * 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.mdsal;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.lispflowmapping.implementation.LispMappingService;
+import org.opendaylight.lispflowmapping.implementation.util.MapServerMapResolverUtil;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.MapRegister;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.MappingDatabase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.db.instance.Mapping;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mapping.database.rev150314.mapping.database.InstanceId;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * DataListener for all Mapping modification events.
+ *
+ * @author Lorand Jakab
+ *
+ */
+public class MappingDataListener extends AbstractDataListener {
+    private static final Logger LOG = LoggerFactory.getLogger(MappingDataListener.class);
+    private LispMappingService msmr;
+
+    public MappingDataListener(DataBroker broker, LispMappingService msmr) {
+        setBroker(broker);
+        setMsmr(msmr);
+        setPath(InstanceIdentifier.create(MappingDatabase.class).child(InstanceId.class)
+                .child(Mapping.class));
+        LOG.trace("Registering Mapping listener.");
+        registerDataChangeListener();
+    }
+
+    @Override
+    public void onDataChanged(
+            AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
+
+     // Process newly created mappings
+        Map<InstanceIdentifier<?>, DataObject> createdData = change.getCreatedData();
+        for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : createdData.entrySet()) {
+            if (entry.getValue() instanceof Mapping) {
+                Mapping mapping = (Mapping)entry.getValue();
+
+                LOG.trace("Received created data");
+                LOG.trace("Key: {}", entry.getKey());
+                LOG.trace("Value: {}", mapping);
+
+                MapRegister register = MapServerMapResolverUtil.getMapRegister(mapping);
+                msmr.handleMapRegister(register, false);
+            }
+        }
+
+        // Process updated mappings
+        Map<InstanceIdentifier<?>, DataObject> updatedData = change.getUpdatedData();
+        for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : updatedData.entrySet()) {
+            if (entry.getValue() instanceof Mapping) {
+                Mapping mapping = (Mapping)entry.getValue();
+
+                LOG.trace("Received changed data");
+                LOG.trace("Key: {}", entry.getKey());
+                LOG.trace("Value: {}", entry.getValue());
+
+                MapRegister register = MapServerMapResolverUtil.getMapRegister(mapping);
+                msmr.handleMapRegister(register, false);
+            }
+        }
+
+        // Process deleted mappings
+        Set<InstanceIdentifier<?>> removedData = change.getRemovedPaths();
+        for (InstanceIdentifier<?> entry : removedData) {
+            DataObject dataObject = change.getOriginalData().get(entry);
+            if (dataObject instanceof Mapping) {
+                Mapping mapping = (Mapping)dataObject;
+
+                LOG.trace("Received deleted data");
+                LOG.trace("Key: {}", entry);
+                LOG.trace("Value: {}", dataObject);
+
+                msmr.removeMapping(mapping.getLispAddressContainer(), mapping.getMaskLength());
+            }
+        }
+    }
+
+    void setMsmr(LispMappingService msmr) {
+        this.msmr = msmr;
+    }
+}
diff --git a/mappingservice/implementation/src/main/resources/lfm_RESTCONF.json.postman_collection b/mappingservice/implementation/src/main/resources/lfm_RESTCONF.json.postman_collection
new file mode 100644 (file)
index 0000000..29fb5d4
--- /dev/null
@@ -0,0 +1,224 @@
+{
+       "id": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+       "name": "lfm RESTCONF",
+       "description": "",
+       "order": [
+               "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"
+       ],
+       "folders": [],
+       "timestamp": 1429906322387,
+       "synced": false,
+       "owner": 0,
+       "sharedWithTeam": false,
+       "subscribed": false,
+       "remoteLink": "",
+       "public": false,
+       "write": true,
+       "requests": [
+               {
+                       "id": "85ba8251-4998-532a-4c4b-611b30974599",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/",
+                       "preRequestScript": "",
+                       "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1430171249428,
+                       "name": "Add/update multiple",
+                       "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}"
+               },
+               {
+                       "id": "9342710c-03ab-7494-909a-5e3e9a6cfc55",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "method": "DELETE",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "data": [],
+                       "dataMode": "params",
+                       "name": "Delete ALL",
+                       "description": "",
+                       "descriptionFormat": "html",
+                       "time": 1430169139026,
+                       "version": 2,
+                       "responses": [],
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "collectionOwner": 0,
+                       "synced": false
+               },
+               {
+                       "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/192.0.2.1/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "method": "PUT",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "data": [],
+                       "dataMode": "raw",
+                       "name": "Add/update key",
+                       "description": "",
+                       "descriptionFormat": "html",
+                       "time": 1430152994477,
+                       "version": 2,
+                       "responses": [],
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "collectionOwner": 0,
+                       "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}"
+               },
+               {
+                       "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": {},
+                       "preRequestScript": "",
+                       "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,
+                       "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/",
+                       "preRequestScript": "",
+                       "pathVariables": {},
+                       "method": "PUT",
+                       "data": [],
+                       "dataMode": "raw",
+                       "version": 2,
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "time": 1430170504842,
+                       "name": "Add/update 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}"
+               },
+               {
+                       "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": {},
+                       "preRequestScript": "",
+                       "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,
+                       "synced": false
+               },
+               {
+                       "id": "dbcd9153-6022-c297-0154-bfa15d8b6872",
+                       "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/lfm-mapping-database:mapping-database/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "method": "GET",
+                       "collectionId": "82344189-c2b0-d9a7-6551-eaafcd1103de",
+                       "data": [],
+                       "dataMode": "params",
+                       "name": "Get ALL",
+                       "description": "",
+                       "descriptionFormat": "html",
+                       "time": 1430168653088,
+                       "version": 2,
+                       "responses": [],
+                       "tests": "",
+                       "currentHelper": "normal",
+                       "helperAttributes": {},
+                       "collectionOwner": 0,
+                       "synced": false
+               },
+               {
+                       "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/192.0.2.1/northbound/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "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,
+                       "synced": false
+               },
+               {
+                       "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/192.0.2.1/",
+                       "pathVariables": {},
+                       "preRequestScript": "",
+                       "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,
+                       "synced": false
+               }
+       ]
+}
\ No newline at end of file