Miscellaneous fixes for reading Linc-OE port types.

 - Keep track of created PortDescriptions so that they can be replayed when
   configurations don't stick
 - Push topology configs to all cluster members (Temporary hack until
   Configs are made Mastership-aware)
 - Port type consistency for Optical ports - default to FIBER port type

Change-Id: Ib2c9e2839c212d2998206bd0106490b2b38446a9
diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
index 2d9f4bb..5e62e09 100644
--- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
+++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -342,7 +342,6 @@
             if (sw.isOptical()) {
                 OpenFlowOpticalSwitch opsw = (OpenFlowOpticalSwitch) sw;
                 opsw.getPortTypes().forEach(type -> {
-                    LOG.debug("ports: {}", opsw.getPortsOf(type));
                     opsw.getPortsOf(type).forEach(
                         op -> {
                             portDescs.add(buildPortDescription(type, (OFPortOptical) op));
@@ -398,10 +397,10 @@
         private PortDescription buildPortDescription(PortDescPropertyType ptype, OFPortOptical port) {
             // Minimally functional fixture. This needs to be fixed as we add better support.
             PortNumber portNo = PortNumber.portNumber(port.getPortNo().getPortNumber());
+
             boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN)
                     && !port.getConfig().contains(OFPortConfig.PORT_DOWN);
             SparseAnnotations annotations = makePortNameAnnotation(port.getName());
-            Port.Type type = FIBER;
 
             if (port.getVersion() == OFVersion.OF_13
                     && ptype == PortDescPropertyType.OPTICAL_TRANSPORT) {
@@ -411,7 +410,7 @@
                 // removable once 1.4+ support complete.
                 LOG.debug("Unsupported optical port properties");
             }
-            return new DefaultPortDescription(portNo, enabled, type, 0, annotations);
+            return new DefaultPortDescription(portNo, enabled, FIBER, 0, annotations);
         }
 
         private PortDescription buildPortDescription(OFPortStatus status) {