[ONOS-4513] Remove optical dependency from store/dist

- Ensure only generic port description will go into the DeviceStore

Change-Id: I7ba6c1680c2d5e3a5579337193c620c89f5f7f41
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
index c0bd97b..c19c468 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
@@ -17,11 +17,6 @@
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.onosproject.net.DefaultAnnotations.union;
-import static org.onosproject.net.optical.device.OchPortHelper.ochPortDescription;
-import static org.onosproject.net.optical.device.OduCltPortHelper.oduCltPortDescription;
-import static org.onosproject.net.optical.device.OmsPortHelper.omsPortDescription;
-import static org.onosproject.net.optical.device.OtuPortHelper.otuPortDescription;
-
 import java.util.Collections;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -32,10 +27,6 @@
 import org.onosproject.net.device.DefaultDeviceDescription;
 import org.onosproject.net.device.DefaultPortDescription;
 import org.onosproject.net.device.DeviceDescription;
-import org.onosproject.net.device.OchPortDescription;
-import org.onosproject.net.device.OduCltPortDescription;
-import org.onosproject.net.device.OmsPortDescription;
-import org.onosproject.net.device.OtuPortDescription;
 import org.onosproject.net.device.PortDescription;
 import org.onosproject.store.Timestamp;
 import org.onosproject.store.impl.Timestamped;
@@ -105,78 +96,9 @@
         if (oldOne != null) {
             SparseAnnotations merged = union(oldOne.value().annotations(),
                                              newDesc.value().annotations());
-            newOne = null;
-            switch (newDesc.value().type()) {
-                case OMS:
-                    if (newDesc.value() instanceof OmsPortDescription) {
-                        // remove if-block after deprecation is complete
-                        OmsPortDescription omsDesc = (OmsPortDescription) (newDesc.value());
-                        newOne = new Timestamped<>(
-                                omsPortDescription(omsDesc,
-                                                   omsDesc.minFrequency(),
-                                                   omsDesc.maxFrequency(),
-                                                   omsDesc.grid(), merged),
-                                newDesc.timestamp());
-                    } else {
-                        // same as default case
-                        newOne = new Timestamped<>(
-                                new DefaultPortDescription(newDesc.value(), merged),
-                                newDesc.timestamp());
-                    }
-                    break;
-                case OCH:
-                    if (newDesc.value() instanceof OchPortDescription) {
-                        // remove if-block after Och related deprecation is complete
-                        OchPortDescription ochDesc = (OchPortDescription) (newDesc.value());
-                        newOne = new Timestamped<>(
-                                ochPortDescription(ochDesc,
-                                                   ochDesc.signalType(),
-                                                   ochDesc.isTunable(),
-                                                   ochDesc.lambda(), merged),
-                                newDesc.timestamp());
-                    } else {
-                        // same as default case
-                        newOne = new Timestamped<>(
-                                new DefaultPortDescription(newDesc.value(), merged),
-                                newDesc.timestamp());
-                    }
-                    break;
-                case ODUCLT:
-                    if (newDesc.value() instanceof OduCltPortDescription) {
-                        // remove if-block after deprecation is complete
-                        OduCltPortDescription ocDesc = (OduCltPortDescription) (newDesc.value());
-                        newOne = new Timestamped<>(
-                                oduCltPortDescription(ocDesc,
-                                                      ocDesc.signalType(),
-                                                      merged),
-                                newDesc.timestamp());
-                    } else {
-                        // same as default case
-                        newOne = new Timestamped<>(
-                                new DefaultPortDescription(newDesc.value(), merged),
-                                newDesc.timestamp());
-                    }
-                    break;
-                case OTU:
-                    if (newDesc.value() instanceof OtuPortDescription) {
-                        // remove if-block after deprecation is complete
-                        OtuPortDescription otuDesc = (OtuPortDescription) (newDesc.value());
-                        newOne = new Timestamped<>(
-                                otuPortDescription(
-                                                   otuDesc, otuDesc.signalType(), merged),
-                                newDesc.timestamp());
-                    } else {
-                        // same as default case
-                        newOne = new Timestamped<>(
-                                new DefaultPortDescription(newDesc.value(), merged),
-                                newDesc.timestamp());
-                    }
-                    break;
-                default:
-                    newOne = new Timestamped<>(
+            newOne = new Timestamped<>(
                             new DefaultPortDescription(newDesc.value(), merged),
                             newDesc.timestamp());
-            }
         }
         portDescs.put(newOne.value().portNumber(), newOne);
     }