[ONOS-5267] Add LispDeviceProvider which launches LISP controller

Change-Id: I0e3277214f4ba526f27dbcd74f10b1ad66444968
diff --git a/providers/lisp/BUCK b/providers/lisp/BUCK
index 41b3bed..f37abbd 100644
--- a/providers/lisp/BUCK
+++ b/providers/lisp/BUCK
@@ -2,6 +2,7 @@
     '//providers/lisp/device:onos-providers-lisp-device',
     '//protocols/lisp/api:onos-protocols-lisp-api',
     '//protocols/lisp/ctl:onos-protocols-lisp-ctl',
+    '//protocols/lisp/msg:onos-protocols-lisp-msg',
 ]
 
 onos_app (
diff --git a/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/LispDeviceProvider.java b/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/LispDeviceProvider.java
new file mode 100644
index 0000000..2307808
--- /dev/null
+++ b/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/LispDeviceProvider.java
@@ -0,0 +1,93 @@
+/*
+ * 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.provider.lisp.device.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.lisp.LispController;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.MastershipRole;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.device.DeviceProvider;
+import org.onosproject.net.provider.AbstractProvider;
+import org.onosproject.net.provider.ProviderId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provider which uses an LISP controller to detect device.
+ */
+@Component(immediate = true)
+public class LispDeviceProvider extends AbstractProvider
+        implements DeviceProvider {
+
+    private static final Logger log = LoggerFactory.getLogger(LispDeviceProvider.class);
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected LispController controller;
+
+    private static final String APP_NAME = "org.onosproject.lisp";
+    private static final String SCHEME_NAME = "lisp";
+    private static final String DEVICE_PROVIDER_PACKAGE = "org.onosproject.lisp.provider.device";
+
+    private ApplicationId appId;
+
+    /**
+     * Creates a LISP device provider.
+     */
+    public LispDeviceProvider() {
+        super(new ProviderId(SCHEME_NAME, DEVICE_PROVIDER_PACKAGE));
+    }
+
+    @Activate
+    public void activate() {
+        appId = coreService.registerApplication(APP_NAME);
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        log.info("Stopped");
+    }
+
+    @Override
+    public void triggerProbe(DeviceId deviceId) {
+
+    }
+
+    @Override
+    public void roleChanged(DeviceId deviceId, MastershipRole newRole) {
+
+    }
+
+    @Override
+    public boolean isReachable(DeviceId deviceId) {
+        return false;
+    }
+
+    @Override
+    public void changePortState(DeviceId deviceId, PortNumber portNumber, boolean enable) {
+
+    }
+}
diff --git a/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/PlaceHolder.java b/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/PlaceHolder.java
deleted file mode 100644
index 7c407d7..0000000
--- a/providers/lisp/device/src/main/java/org/onosproject/provider/lisp/device/impl/PlaceHolder.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.provider.lisp.device.impl;
-
-/**
- * Remove me.
- */
-@Deprecated
-public abstract class PlaceHolder {
-
-}