Cleaned up some commented code, javadocs and names in SDN-IP.

No functional changes.

Change-Id: Ic4421428ec468049f1d93ac457c08103543d5140
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java
index 92d48f7..6477ba6 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java
@@ -43,7 +43,7 @@
                    @JsonProperty("attachmentPort") int port,
                    @JsonProperty("ipAddress") String ipAddress) {
         this.connectPoint = new ConnectPoint(
-                DeviceId.deviceId(SdnIpConfigReader.dpidToUri(dpid)),
+                DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(dpid)),
                 PortNumber.portNumber(port));
         this.ipAddress = IpAddress.valueOf(ipAddress);
     }
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java
index 4e79672..1a1c5f0 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java
@@ -64,7 +64,7 @@
         this.name = name;
         this.macAddress = MacAddress.valueOf(macAddress);
         this.connectPoint = new ConnectPoint(
-                DeviceId.deviceId(SdnIpConfigReader.dpidToUri(attachmentDpid)),
+                DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(attachmentDpid)),
                 PortNumber.portNumber(attachmentPort));
     }
 
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java
index f50c85f..6c48b61 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java
@@ -48,7 +48,7 @@
                             @JsonProperty("interfacePort") int port,
                             @JsonProperty("ipAddress") String ipAddress) {
         this.connectPoint = new ConnectPoint(
-                DeviceId.deviceId(SdnIpConfigReader.dpidToUri(dpid)),
+                DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(dpid)),
                 PortNumber.portNumber(port));
         this.ipAddress = IpAddress.valueOf(ipAddress);
     }
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationReader.java
similarity index 85%
rename from apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java
rename to apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationReader.java
index 7262c42..90ea14c 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationReader.java
@@ -28,14 +28,11 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-// TODO: As a long term solution, a module providing general network configuration to ONOS nodes should be used.
-
 /**
- * SDN-IP Config Reader provides IConfigInfoService by reading from an
- * SDN-IP configuration file. It must be enabled on the nodes within the cluster
- * not running SDN-IP.
+ * Implementation of SdnIpConfigurationService which reads SDN-IP configuration
+ * from a file.
  */
-public class SdnIpConfigReader implements SdnIpConfigService {
+public class SdnIpConfigurationReader implements SdnIpConfigurationService {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
@@ -75,7 +72,10 @@
         }
     }
 
-    public void init() {
+    /**
+     * Instructs the configuration reader to read the configuration from the file.
+     */
+    public void readConfiguration() {
         readConfiguration(configFileName);
     }
 
@@ -89,6 +89,13 @@
         return Collections.unmodifiableMap(bgpPeers);
     }
 
+    /**
+     * Converts DPIDs of the form xx:xx:xx:xx:xx:xx:xx to OpenFlow provider
+     * device URIs.
+     *
+     * @param dpid the DPID string to convert
+     * @return the URI string for this device
+     */
     static String dpidToUri(String dpid) {
         return "of:" + dpid.replace(":", "");
     }
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationService.java
similarity index 62%
rename from apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java
rename to apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationService.java
index 6ad4bbb..741dd6f 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigurationService.java
@@ -23,14 +23,7 @@
  * Provides information about the layer 3 properties of the network.
  * This is based on IP addresses configured on ports in the network.
  */
-public interface SdnIpConfigService {
-
-    /**
-     * Gets the list of virtual external-facing interfaces.
-     *
-     * @return the map of interface names to interface objects
-     */
-    //public Map<String, Interface> getInterfaces();
+public interface SdnIpConfigurationService {
 
     /**
      * Gets the list of BGP speakers inside the SDN network.
@@ -46,15 +39,4 @@
      */
     public Map<IpAddress, BgpPeer> getBgpPeers();
 
-    /**
-     * Gets the Interface object for the interface that packets
-     * to dstIpAddress will be sent out of. Returns null if dstIpAddress is not
-     * in a directly connected network, or if no interfaces are configured.
-     *
-     * @param dstIpAddress destination IP address that we want to match to
-     *                     an outgoing interface
-     * @return the Interface object if one is found, otherwise null
-     */
-    //public Interface getOutgoingInterface(IpAddress dstIpAddress);
-
 }
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java
index 6720667..4302064 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java
@@ -15,6 +15,6 @@
  */
 
 /**
- * SDN-IP configuration.
+ * SDN-IP configuration services.
  */
 package org.onlab.onos.sdnip.config;
\ No newline at end of file