ONOS-4415 Remove OmsPort out of core.

Change-Id: Ic796c4e715789ba18f350f28e29db04dd537822f
diff --git a/core/api/src/main/java/org/onosproject/net/optical/OmsPort.java b/core/api/src/main/java/org/onosproject/net/optical/OmsPort.java
new file mode 100644
index 0000000..a08ab5f
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/optical/OmsPort.java
@@ -0,0 +1,64 @@
+/*
+ * 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.net.optical;
+
+import org.onlab.util.Frequency;
+import org.onosproject.net.Port;
+
+import com.google.common.annotations.Beta;
+
+/**
+ * OMS port (Optical Multiplexing Section).
+ * Also referred to as a WDM port or W-port.
+ * See ITU G.709 "Interfaces for the Optical Transport Network (OTN)"
+ *
+ * Assumes we only support fixed grid for now.
+ */
+@Beta
+public interface OmsPort extends Port {
+
+    /**
+     * Returns the total number of channels on the port.
+     *
+     * @return total number of channels
+     */
+    default short totalChannels() {
+        Frequency diff = maxFrequency().subtract(minFrequency());
+        return (short) (diff.asHz() / grid().asHz());
+    }
+
+    /**
+     * Returns the minimum frequency.
+     *
+     * @return minimum frequency
+     */
+    Frequency minFrequency();
+
+    /**
+     * Returns the maximum frequency.
+     *
+     * @return maximum frequency
+     */
+    Frequency maxFrequency();
+
+    /**
+     * Returns the grid spacing frequency.
+     *
+     * @return grid spacing frequency
+     */
+    Frequency grid();
+
+}