Initial commit
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/ILinkStorage.java b/src/main/java/net/floodlightcontroller/linkdiscovery/ILinkStorage.java
new file mode 100644
index 0000000..6d66a49
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/ILinkStorage.java
@@ -0,0 +1,39 @@
+package net.floodlightcontroller.linkdiscovery;
+
+import java.util.List;
+
+import net.floodlightcontroller.core.INetMapStorage;
+import net.floodlightcontroller.routing.Link;
+
+public interface ILinkStorage extends INetMapStorage {
+
+ /*
+ * Link creation
+ */
+ public void update(Link link, DM_OPERATION op);
+ public void update(List<Link> List, DM_OPERATION op);
+
+ /*
+ * Add Linkinfo
+ */
+ public void update(Link link, LinkInfo linkinfo, DM_OPERATION op);
+
+ /*
+ * Get Links from Storage
+ * If dpid and port both are specified specific link is retrieved
+ * If only dpid is set all links associated with Switch are retrieved
+ */
+ public List<Link> getLinks(Long dpid, int port);
+
+ /*
+ * Delete links associated with dpid and port
+ * If only dpid is used, All links associated for switch are removed
+ * Useful for port up/down and also switch join/remove events
+ */
+ public void deleteLinks(Long dpid, int port);
+
+ /*
+ * Init with Storage conf
+ */
+ public void init(String conf);
+}
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplStubs.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplStubs.java
new file mode 100644
index 0000000..9d61981
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplStubs.java
@@ -0,0 +1,72 @@
+/**
+ *
+ */
+package net.floodlightcontroller.linkdiscovery.internal;
+
+import java.util.List;
+
+import net.floodlightcontroller.linkdiscovery.ILinkStorage;
+import net.floodlightcontroller.linkdiscovery.LinkInfo;
+import net.floodlightcontroller.routing.Link;
+
+/**
+ * @author pankaj
+ *
+ */
+public class LinkStorageImplStubs implements ILinkStorage {
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#update(net.floodlightcontroller.routing.Link, net.floodlightcontroller.core.INetMapStorage.DM_OPERATION)
+ */
+ @Override
+ public void update(Link link, DM_OPERATION op) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#update(java.util.List, net.floodlightcontroller.core.INetMapStorage.DM_OPERATION)
+ */
+ @Override
+ public void update(List<Link> List, DM_OPERATION op) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#update(net.floodlightcontroller.routing.Link, net.floodlightcontroller.linkdiscovery.LinkInfo, net.floodlightcontroller.core.INetMapStorage.DM_OPERATION)
+ */
+ @Override
+ public void update(Link link, LinkInfo linkinfo, DM_OPERATION op) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#getLinks(java.lang.Long, int)
+ */
+ @Override
+ public List<Link> getLinks(Long dpid, int port) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#deleteLinks(java.lang.Long, int)
+ */
+ @Override
+ public void deleteLinks(Long dpid, int port) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.floodlightcontroller.linkdiscovery.ILinkStorage#init(java.lang.String)
+ */
+ @Override
+ public void init(String conf) {
+ // TODO Auto-generated method stub
+
+ }
+
+}