openstack and routing app OSGi property migration

Change-Id: I855020959456f059911284bb7d8ade376cbc20c5
diff --git a/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
index 6eb23d4..d12c6d8 100644
--- a/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
+++ b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
@@ -81,10 +81,18 @@
 import java.util.Map;
 import java.util.Set;
 
+import static org.onosproject.routing.fibinstaller.OsgiPropertyConstants.ROUTE_TO_NEXT_HOP;
+import static org.onosproject.routing.fibinstaller.OsgiPropertyConstants.ROUTE_TO_NEXT_HOP_DEFAULT;
+
 /**
  * Programs routes to a single OpenFlow switch.
  */
-@Component(immediate = true)
+@Component(
+    immediate = true,
+    property = {
+        ROUTE_TO_NEXT_HOP + ":Boolean=  " + ROUTE_TO_NEXT_HOP_DEFAULT
+    }
+)
 public class FibInstaller {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
@@ -124,9 +132,8 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected ApplicationService applicationService;
 
-    //@Property(name = "routeToNextHop", boolValue = false,
-    //        label = "Install a /32 or /128 route to each next hop")
-    private boolean routeToNextHop = false;
+    /** Install a /32 or /128 route to each next hop. */
+    private boolean routeToNextHop = ROUTE_TO_NEXT_HOP_DEFAULT;
 
     // Device id of data-plane switch - should be learned from config
     private DeviceId deviceId;
diff --git a/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/OsgiPropertyConstants.java b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/OsgiPropertyConstants.java
new file mode 100644
index 0000000..731ce4f
--- /dev/null
+++ b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/OsgiPropertyConstants.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.routing.fibinstaller;
+
+/**
+ * Name/Value constants for properties.
+ */
+public final class OsgiPropertyConstants {
+    private OsgiPropertyConstants() {
+    }
+
+    public static final String ROUTE_TO_NEXT_HOP = "routeToNextHop";
+    public static final boolean ROUTE_TO_NEXT_HOP_DEFAULT = false;
+}