ISIS protocol manual merge from 1.6 due to cherry pick merge conflict

Change-Id: I6c3abf6a83ddaeba76293dc7864fcec88e9b4e7e
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisController.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisController.java
index fc10019..2b4cde0 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisController.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisController.java
@@ -16,9 +16,11 @@
 package org.onosproject.isis.controller;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import org.onosproject.isis.controller.topology.IsisLinkListener;
 import org.onosproject.isis.controller.topology.IsisRouterListener;
 
 import java.util.List;
+import java.util.Set;
 
 /**
  * Representation of an ISIS controller.
@@ -52,4 +54,32 @@
      * @return list of process instances
      */
     List<IsisProcess> allConfiguredProcesses();
+
+    /**
+     * Registers a listener for ISIS message events.
+     *
+     * @param listener the listener to notify
+     */
+    void addLinkListener(IsisLinkListener listener);
+
+    /**
+     * Unregisters a link listener.
+     *
+     * @param listener the listener to unregister
+     */
+    void removeLinkListener(IsisLinkListener listener);
+
+    /**
+     * Gets the list of listeners registered for router events.
+     *
+     * @return list of listeners
+     */
+    Set<IsisRouterListener> listener();
+
+    /**
+     * Gets the list of listeners registered for link events.
+     *
+     * @return list of listeners
+     */
+    Set<IsisLinkListener> linkListener();
 }
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisInterface.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisInterface.java
index 3f775cc..d80c208 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisInterface.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisInterface.java
@@ -318,4 +318,4 @@
      * Removes all the neighbors.
      */
     void removeNeighbors();
-}
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdb.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdb.java
old mode 100644
new mode 100755
index c9e1586..2fdac6c
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdb.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdb.java
@@ -122,4 +122,11 @@
      * @param l2LspSeqNo link state sequence number
      */
     void setL2LspSeqNo(int l2LspSeqNo);
+    /**
+     * Removes topology information when neighbor down.
+     *
+     * @param neighbor ISIS neighbor instance
+     * @param isisInterface ISIS interface instance
+     */
+    void removeTopology(IsisNeighbor neighbor, IsisInterface isisInterface);
 }
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdbAge.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdbAge.java
index 314f9f8..e58aeef 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdbAge.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLsdbAge.java
@@ -69,4 +69,4 @@
      * @param lspWrapper LSP wrapper instance
      */
     void removeLspFromBin(LspWrapper lspWrapper);
-}
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLspBin.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLspBin.java
index 0964aae..c5ced26 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLspBin.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisLspBin.java
@@ -44,4 +44,4 @@
      * @param lspWrapper LSP wrapper instance
      */
     void removeIsisLsp(String lspKey, LspWrapper lspWrapper);
-}
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisNetworkType.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisNetworkType.java
index 083e6d9..d4a5dc5 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisNetworkType.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/IsisNetworkType.java
@@ -43,7 +43,6 @@
 
     private int value;
 
-
     /**
      * Creates an instance of ISIS network type.
      *
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/LspWrapper.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/LspWrapper.java
index a4615f7..2f667c7 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/LspWrapper.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/LspWrapper.java
@@ -124,4 +124,4 @@
      * @param lspProcessing "refreshLsp" or "maxageLsp" based on LSP to process
      */
     void setLspProcessing(String lspProcessing);
-}
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/DeviceInformation.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/DeviceInformation.java
new file mode 100644
index 0000000..7f8947f
--- /dev/null
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/DeviceInformation.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.isis.controller.topology;
+
+import org.onlab.packet.Ip4Address;
+
+/**
+ * Representation of an ISIS device information.
+ */
+public interface DeviceInformation {
+
+    /**
+     * Gets system id.
+     *
+     * @return system id
+     */
+    String systemId();
+
+    /**
+     * Sets system id.
+     *
+     * @param systemId system id
+     */
+    void setSystemId(String systemId);
+
+    /**
+     * Gets interface ids.
+     *
+     * @return interface ids
+     */
+    Ip4Address interfaceId();
+
+    /**
+     * Sets interface id.
+     *
+     * @param interfaceId interface id
+     */
+    void setInterfaceId(Ip4Address interfaceId);
+
+    /**
+     * Gets area id.
+     *
+     * @return area id
+     */
+    String areaId();
+
+    /**
+     * Sets area id.
+     *
+     * @param areaId area id
+     */
+    void setAreaId(String areaId);
+
+    /**
+     * Gets device information is already created or not.
+     *
+     * @return true if device information is already created else false
+     */
+    boolean isAlreadyCreated();
+
+    /**
+     * Sets device information is already created or not.
+     *
+     * @param alreadyCreated true if device information is already created else false
+     */
+    void setAlreadyCreated(boolean alreadyCreated);
+
+    /**
+     * Gets device is dis or not.
+     *
+     * @return true if device is dis else false
+     */
+    boolean isDis();
+
+    /**
+     * Sets device is dis or not.
+     *
+     * @param dis true if device is dr else false
+     */
+    void setDis(boolean dis);
+
+    /**
+     * Gets neighbor id.
+     *
+     * @return neighbor id
+     */
+    String neighborId();
+
+    /**
+     * Sets neighbor id.
+     *
+     * @param neighborId neighbor id
+     */
+    void setNeighborId(String neighborId);
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisAgent.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisAgent.java
new file mode 100644
index 0000000..7207fd4
--- /dev/null
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisAgent.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.isis.controller.topology;
+
+/**
+ * Representation of an ISIS agent.
+ * It is responsible for keeping track of the current set of routers
+ * connected to the system.
+ */
+public interface IsisAgent {
+    /**
+     * Adds a router that has just connected to the system.
+     *
+     * @param isisRouter the router id to add
+     * @return true if added, false otherwise
+     */
+    boolean addConnectedRouter(IsisRouter isisRouter);
+
+    /**
+     * Removes the router which got disconnected from the system.
+     *
+     * @param isisRouter the router id to remove
+     */
+    void removeConnectedRouter(IsisRouter isisRouter);
+
+    /**
+     * Notifies that got a packet of link from network and need do processing.
+     *
+     * @param isisLink  link instance
+     */
+    void addLink(IsisLink isisLink);
+
+    /**
+     * Notifies that got a packet of link from network and need do processing.
+     *
+     * @param isisLink  link instance
+     */
+    void deleteLink(IsisLink isisLink);
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLink.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLink.java
index 1760106..7a70cc3 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLink.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLink.java
@@ -15,9 +15,7 @@
  */
 package org.onosproject.isis.controller.topology;
 
-import org.onlab.packet.IpAddress;
-
-import java.util.List;
+import org.onlab.packet.Ip4Address;
 
 /**
  * Abstraction of an ISIS Link.
@@ -25,58 +23,72 @@
 public interface IsisLink {
 
     /**
-     * Returns IP address of the Router.
+     * Returns the remote system ID.
      *
-     * @return IP address of router
+     * @return remote system ID
      */
-    IpAddress remoteRouterId();
+    String remoteSystemId();
 
     /**
-     * Returns the area ID for this device.
+     * Returns the local system ID.
      *
-     * @return the area ID
+     * @return local system ID
      */
-    int areaIdOfInterface();
+    String localSystemId();
 
     /**
      * Returns IP address of the interface.
      *
      * @return IP address of the interface
      */
-    IpAddress interfaceIp();
+    Ip4Address interfaceIp();
 
     /**
-     * Returns the list of link TED details.
+     * Returns IP address of the neighbor.
      *
-     * @return linkTed list of link TED
+     * @return IP address of the neighbor
      */
-    List<IsisLinkTed> linkTed();
+    Ip4Address neighborIp();
 
     /**
-     * Sets IP address of the router.
+     * Returns the link TED details.
      *
-     * @param routerIp router's IP address
+     * @return linkTed link TED
      */
-    void setRouterIp(IpAddress routerIp);
+    IsisLinkTed linkTed();
 
     /**
-     * Sets the area ID for this device.
+     * Sets remote system ID.
      *
-     * @param areaIdOfInterface area ID
+     * @param remoteSystemId remote system ID
      */
-    void setAreaIdOfInterface(int areaIdOfInterface);
+    void setRemoteSystemId(String remoteSystemId);
+
+    /**
+     * Sets local system ID.
+     *
+     * @param localSystemId remote system ID
+     */
+    void setLocalSystemId(String localSystemId);
 
     /**
      * Sets IP address of the interface.
      *
      * @param interfaceIp IP address of the interface
      */
-    void setInterfaceIp(IpAddress interfaceIp);
+    void setInterfaceIp(Ip4Address interfaceIp);
 
     /**
-     * Sets the list of link TED.
+     * Sets IP address of the neighbor.
      *
-     * @param linkTed list of link TED
+     * @param neighborIp IP address of the neighbor
      */
-    void setLinkTed(List<IsisLinkTed> linkTed);
+    void setNeighborIp(Ip4Address neighborIp);
+
+    /**
+     * Sets the link TED information.
+     *
+     * @param linkTed link TED
+     */
+    void setLinkTed(IsisLinkTed linkTed);
 }
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkListener.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkListener.java
index b96d81c..3f7e484 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkListener.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkListener.java
@@ -23,16 +23,14 @@
     /**
      * Notifies that we got a link from network.
      *
-     * @param isisRouter  router instance
-     * @param isisLinkTed link TED information of router
+     * @param isisLink link instance
      */
-    void addLink(IsisRouter isisRouter, IsisLinkTed isisLinkTed);
+    void addLink(IsisLink isisLink);
 
     /**
      * Notifies that a link got removed from network.
      *
-     * @param isisRouter router instance
-     * @param isisLinkTed isis link ted infromation
+     * @param isisLink link instance
      */
-    void deleteLink(IsisRouter isisRouter, IsisLinkTed isisLinkTed);
+    void deleteLink(IsisLink isisLink);
 }
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkTed.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkTed.java
index 08014b8..25f3177 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkTed.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisLinkTed.java
@@ -16,7 +16,6 @@
 package org.onosproject.isis.controller.topology;
 
 import org.onlab.packet.Ip4Address;
-import org.onlab.packet.Ip6Address;
 import org.onlab.util.Bandwidth;
 
 import java.util.List;
@@ -27,114 +26,100 @@
 public interface IsisLinkTed {
 
     /**
-     * Provides maximum bandwidth can be used on the link.
+     * Gets the administrative group.
      *
-     * @return maximum bandwidth
+     * @return administrative group
      */
-    Bandwidth maximumLink();
+    int administrativeGroup();
 
     /**
-     * Sets maximum band width.
+     * Sets the administrative group.
      *
-     * @param bandwidth maximum bandwidth
+     * @param administrativeGroup administrative group
      */
-    void setMaximumLink(Bandwidth bandwidth);
+    void setAdministrativeGroup(int administrativeGroup);
 
     /**
-     * Amount of bandwidth reservable on the link.
+     * Provides the IPv4 interface address.
+     *
+     * @return IPv4 interface address
+     */
+    Ip4Address ipv4InterfaceAddress();
+
+    /**
+     * Sets the IPv4 interface address.
+     *
+     * @param interfaceAddress IPv4 interface address
+     */
+    void setIpv4InterfaceAddress(Ip4Address interfaceAddress);
+
+    /**
+     * Provides the IPv4 neighbor address.
+     *
+     * @return IPv4 neighbor address
+     */
+    Ip4Address ipv4NeighborAddress();
+
+    /**
+     * Sets the IPv4 neighbor address.
+     *
+     * @param neighborAddress IPv4 neighbor address
+     */
+    void setIpv4NeighborAddress(Ip4Address neighborAddress);
+
+    /**
+     * Gets the maximum link bandwidth.
+     *
+     * @return maximum link bandwidth
+     */
+    Bandwidth maximumLinkBandwidth();
+
+    /**
+     * Sets the maximum link bandwidth.
+     *
+     * @param bandwidth maximum link bandwidth
+     */
+    void setMaximumLinkBandwidth(Bandwidth bandwidth);
+
+    /**
+     * Provides max bandwidth that can be reservable on the link.
+     *
+     * @return max bandwidth reservable
+     */
+    Bandwidth maximumReservableLinkBandwidth();
+
+    /**
+     * Sets max bandwidth that can be reservable on the link.
+     *
+     * @param bandwidth max bandwidth that can be reservable on the link
+     */
+    void setMaximumReservableLinkBandwidth(Bandwidth bandwidth);
+
+    /**
+     * Amount of bandwidth unreserved on the link.
      *
      * @return unreserved bandwidth
      */
-    List<Bandwidth> maxUnResBandwidth();
+    List<Bandwidth> unreservedBandwidth();
 
     /**
-     * Sets max bandwidth that is not reserved on the link.
+     * Sets the bandwidth unreserved on the link.
      *
-     * @param bandwidth max bandwidth that is not reserved on the link
+     * @param bandwidth bandwidth unreserved
      */
-    void setMaxUnResBandwidth(Bandwidth bandwidth);
-
-    /**
-     * Provides max bandwidth that can be reserved on the link.
-     *
-     * @return max bandwidth reserved
-     */
-    Bandwidth maxReserved();
-
-    /**
-     * Sets max bandwidth that can be reserved on the link.
-     *
-     * @param bandwidth max bandwidth that can be reserved on the link
-     */
-    void setMaxReserved(Bandwidth bandwidth);
+    void setUnreservedBandwidth(List<Bandwidth> bandwidth);
 
     /**
      * Provides Traffic Engineering metric for the link.
      *
-     * @return Traffic Engineering metric
+     * @return Traffic Engineering Default metric
      */
-    int teMetric();
+    long teDefaultMetric();
 
     /**
      * Sets Traffic Engineering metric for the link.
      *
-     * @param teMetric Traffic Engineering metric for the link
+     * @param teMetric Traffic Engineering Default metric for the link
      */
-    void setTeMetric(int teMetric);
-
-    /**
-     * Provides IPv4 router-Id of local node.
-     *
-     * @return IPv4 router-Id of local node
-     */
-    List<Ip4Address> ipv4LocRouterId();
-
-    /**
-     * Sets IPv4 router-Id of local node.
-     *
-     * @param routerIds IPv4 router-Id of local node
-     */
-    void setIpv4LocRouterId(List<Ip4Address> routerIds);
-
-    /**
-     * Provides IPv6 router-Id of local node.
-     *
-     * @return IPv6 router-Id of local node
-     */
-    List<Ip6Address> ipv6LocRouterId();
-
-    /**
-     * Sets IPv6 router-Id of local node.
-     *
-     * @param routerIds IPv6 router-Id of local node
-     */
-    void setIpv6LocRouterId(List<Ip6Address> routerIds);
-
-    /**
-     * Provides IPv4 router-Id of remote node.
-     *
-     * @return IPv4 router-Id of remote node
-     */
-    List<Ip4Address> ipv4RemRouterId();
-
-    /**
-     * Sets IPv4 router-Id of remote node.
-     *
-     * @param routerIds IPv4 router-Id of remote node
-     */
-    void setIpv4RemRouterId(List<Ip4Address> routerIds);
-
-    /**
-     * Provides IPv6 router-Id of remote node.
-     *
-     * @return IPv6 router-Id of remote node
-     */
-    List<Ip6Address> ipv6RemRouterId();
-
-    /**
-     * Sets IPv6 router-Id of remote node.
-     *
-     * @param routerIds IPv6 router-Id of remote node
-     */
-    void setIpv6RemRouterId(List<Ip6Address> routerIds);
+    void setTeDefaultMetric(long teMetric);
 }
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouter.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouter.java
index 56ad7da..40ed48a2a 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouter.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouter.java
@@ -23,11 +23,11 @@
 public interface IsisRouter {
 
     /**
-     * Returns IP address of the router.
+     * Returns system ID for the router.
      *
-     * @return IP address of the router
+     * @return system ID of the router
      */
-    Ip4Address routerIp();
+    String systemId();
 
     /**
      * Returns IP address of the interface.
@@ -37,9 +37,44 @@
     Ip4Address interfaceId();
 
     /**
-     * Sets IP address of the Router.
+     * Gets IP address of the interface.
      *
-     * @param routerIp IP address of the router
+     * @param interfaceId IP address of the interface
      */
-    void setRouterIp(Ip4Address routerIp);
+    void setInterfaceId(Ip4Address interfaceId);
+
+    /**
+     * Sets system ID of the Router.
+     *
+     * @param systemId system ID of the router
+     */
+    void setSystemId(String systemId);
+
+    /**
+     * Gets neighbours ID.
+     *
+     * @return neighbour ID
+     */
+    Ip4Address neighborRouterId();
+
+    /**
+     * Sets the neighbour Id.
+     *
+     * @param neighbourId neighbour Id
+     */
+    void setNeighborRouterId(Ip4Address neighbourId);
+
+    /**
+     * Gets if the router id DIS or not.
+     *
+     * @return true if the router is DIS else false
+     */
+    boolean isDis();
+
+    /**
+     * Sets if the router id DIS or not.
+     *
+     * @param dis true if the router is DIS else false
+     */
+    void setDis(boolean dis);
 }
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterId.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterId.java
new file mode 100644
index 0000000..a40d68b
--- /dev/null
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterId.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.isis.controller.topology;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * Represents an ISIS router id.
+ */
+public class IsisRouterId {
+
+    private static final String SCHEME = "l3";
+    private static final long UNKNOWN = 0;
+    private final String ipAddress;
+
+    /**
+     * Creates an instance of ISIS router id.
+     *
+     * @param ipAddress IP address of the router
+     */
+    public IsisRouterId(String ipAddress) {
+        this.ipAddress = ipAddress;
+    }
+
+    /**
+     * Creates an instance from ip address.
+     *
+     * @param ipAddress IP address
+     * @return ISIS router id instance
+     */
+    public static IsisRouterId isisRouterId(String ipAddress) {
+        return new IsisRouterId(ipAddress);
+    }
+
+    /**
+     * Creates ISIS router id instance from the URI.
+     *
+     * @param uri device URI
+     * @return ISIS router id instance
+     */
+    public static IsisRouterId isisRouterId(URI uri) {
+        checkArgument(uri.getScheme().equals(SCHEME), "Unsupported URI scheme");
+        return new IsisRouterId(uri.getSchemeSpecificPart());
+    }
+
+    /**
+     * Returns device URI from the given router id.
+     *
+     * @param isisRouterId router id instance
+     * @return device URI
+     */
+    public static URI uri(IsisRouterId isisRouterId) {
+        return uri(isisRouterId.ipAddress());
+    }
+
+    /**
+     * Returns device URI from the given IP address.
+     *
+     * @param ipAddress device IP address
+     * @return device URI
+     */
+    public static URI uri(String ipAddress) {
+        try {
+            return new URI(SCHEME, ipAddress, null);
+        } catch (URISyntaxException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Returns the IP address.
+     *
+     * @return IP address
+     */
+    public String ipAddress() {
+        return ipAddress;
+    }
+
+    @Override
+    public String toString() {
+        return ipAddress;
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (!(other instanceof IsisRouterId)) {
+            return false;
+        }
+
+        IsisRouterId otherIsisRouterId = (IsisRouterId) other;
+        return Objects.equals(ipAddress, otherIsisRouterId.ipAddress);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(ipAddress);
+    }
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterListener.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterListener.java
index 82d6c61..56da9b5 100644
--- a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterListener.java
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/IsisRouterListener.java
@@ -34,11 +34,4 @@
      * @param isisRouter ISIS router instance
      */
     void routerRemoved(IsisRouter isisRouter);
-
-    /**
-     * Notifies that the router has changed in some way.
-     *
-     * @param isisRouter ISIS router instance
-     */
-    void routerChanged(IsisRouter isisRouter);
 }
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/LinkInformation.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/LinkInformation.java
new file mode 100644
index 0000000..9c30f4d
--- /dev/null
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/LinkInformation.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.isis.controller.topology;
+
+import org.onlab.packet.Ip4Address;
+
+/**
+ * Representation of an ISIS link information.
+ */
+public interface LinkInformation {
+
+    /**
+     * Gets link id.
+     *
+     * @return link id
+     */
+    String linkId();
+
+    /**
+     * Sets link id.
+     *
+     * @param linkId link id
+     */
+    void setLinkId(String linkId);
+
+    /**
+     * Gets whether link information is already created or not.
+     *
+     * @return true if link information is already created else false
+     */
+    boolean isAlreadyCreated();
+
+    /**
+     * Sets link information is already created or not.
+     *
+     * @param alreadyCreated true if link information is already created else false
+     */
+    void setAlreadyCreated(boolean alreadyCreated);
+
+
+    /**
+     * Returns link destination ID.
+     *
+     * @return link destination ID
+     */
+    String linkDestinationId();
+
+    /**
+     * Sets link destination id.
+     *
+     * @param linkDestinationId link destination id
+     */
+    void setLinkDestinationId(String linkDestinationId);
+
+    /**
+     * Gets link source id.
+     *
+     * @return link source id
+     */
+    String linkSourceId();
+
+    /**
+     * Sets link source id.
+     *
+     * @param linkSourceId link source id
+     */
+    void setLinkSourceId(String linkSourceId);
+
+    /**
+     * Gets interface ip address.
+     *
+     * @return interface ip address
+     */
+    Ip4Address interfaceIp();
+
+    /**
+     * Sets interface ip address.
+     *
+     * @param interfaceIp interface ip address
+     */
+    void setInterfaceIp(Ip4Address interfaceIp);
+
+    /**
+     * Gets neighbor ip address.
+     *
+     * @return neighbor ip address
+     */
+    Ip4Address neighborIp();
+
+    /**
+     * Sets neighbor ip address.
+     *
+     * @param neighborIp neighbor ip address
+     */
+    void setNeighborIp(Ip4Address neighborIp);
+}
\ No newline at end of file
diff --git a/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/TopologyForDeviceAndLink.java b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/TopologyForDeviceAndLink.java
new file mode 100644
index 0000000..4153efb
--- /dev/null
+++ b/protocols/isis/api/src/main/java/org/onosproject/isis/controller/topology/TopologyForDeviceAndLink.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.isis.controller.topology;
+
+import java.util.Map;
+
+/**
+ * Represents IP topology for ISIS device and link details.
+ */
+public interface TopologyForDeviceAndLink {
+
+    /**
+     * Gets the device information.
+     *
+     * @return device information
+     */
+    Map<String, DeviceInformation> deviceInformationMap();
+
+    /**
+     * Sets the device information.
+     *
+     * @param key                  system ID of the device as key
+     * @param deviceInformationMap device information instance
+     */
+    void setDeviceInformationMap(String key, DeviceInformation deviceInformationMap);
+
+    /**
+     * Gets the link information.
+     *
+     * @return link information
+     */
+    Map<String, LinkInformation> linkInformationMap();
+
+    /**
+     * Sets link information.
+     *
+     * @param key                system ID of the device as key
+     * @param linkInformationMap link information instance
+     */
+    void setLinkInformationMap(String key, LinkInformation linkInformationMap);
+
+    /**
+     * Removes link information.
+     *
+     * @param key key used to remove from map
+     */
+    void removeLinkInformationMap(String key);
+
+    /**
+     * Removes device information.
+     *
+     * @param key key used to remove from map
+     */
+    void removeDeviceInformationMap(String key);
+
+    /**
+     * Removes links from linkInformationMap.
+     *
+     * @param linkId ID
+     */
+    void removeLinks(String linkId);
+
+    /**
+     * Gets deviceInformation as map.
+     *
+     * @return deviceInformationMap to delete from core
+     */
+    Map<String, DeviceInformation> deviceInformationMapToDelete();
+
+    /**
+     * Sets deviceInformation as map.
+     *
+     * @param key                          key used to add in map
+     * @param deviceInformationMapToDelete device information to delete from map
+     */
+    void setDeviceInformationMapToDelete(String key, DeviceInformation deviceInformationMapToDelete);
+
+    /**
+     * Removes Device Information from deviceInformationMapToDelete.
+     *
+     * @param key key to remove from map
+     */
+    void removeDeviceInformationMapFromDeleteMap(String key);
+
+    /**
+     * Gets deviceInformation as map for Point-To-Point.
+     *
+     * @return deviceInformationMap
+     */
+    Map<String, DeviceInformation> deviceInformationMapForPointToPoint();
+
+    /**
+     * Sets deviceInformation as map for Point-To-Point..
+     *
+     * @param key                  key to add to map
+     * @param deviceInformationMap device information map
+     */
+    void setDeviceInformationMapForPointToPoint(String key, DeviceInformation deviceInformationMap);
+
+    /**
+     * Gets linkInformation as map for PointToPoint.
+     *
+     * @return linkInformationMap
+     */
+    Map<String, LinkInformation> linkInformationMapForPointToPoint();
+
+    /**
+     * Sets linkInformation as map for PointToPoint.
+     *
+     * @param key                key to add link information to map
+     * @param linkInformationMap link information to add
+     */
+    void setLinkInformationMapForPointToPoint(String key, LinkInformation linkInformationMap);
+}
\ No newline at end of file