diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/TributarySlotQuery.java b/core/api/src/main/java/org/onosproject/net/behaviour/TributarySlotQuery.java
new file mode 100644
index 0000000..34c0490
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/TributarySlotQuery.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2015 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.behaviour;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.TributarySlot;
+import org.onosproject.net.driver.HandlerBehaviour;
+
+import java.util.Set;
+
+/**
+ * Behaviour to retrieve available tributary slot resources.
+ */
+@Beta
+public interface TributarySlotQuery extends HandlerBehaviour {
+
+    /**
+     * Returns set of TributarySlot instances which can be used at the port.
+     *
+     * @param port port to be checked for the available resources.
+     * @return set of TributarySlot instances which can be used at the port.
+     */
+    Set<TributarySlot> queryTributarySlots(PortNumber port);
+}
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
index d1f6aab..9494cbe 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
+++ b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
@@ -16,20 +16,18 @@
 package org.onosproject.net.newresource.impl;
 
 import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
 import org.onlab.packet.MplsLabel;
 import org.onlab.packet.VlanId;
 import org.onlab.util.ItemNotFoundException;
 import org.onosproject.net.Device;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.Port;
-import org.onosproject.net.OchPort;
 import org.onosproject.net.OchSignal;
+import org.onosproject.net.Port;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.TributarySlot;
-import org.onosproject.net.OduSignalType;
 import org.onosproject.net.behaviour.LambdaQuery;
 import org.onosproject.net.behaviour.MplsQuery;
+import org.onosproject.net.behaviour.TributarySlotQuery;
 import org.onosproject.net.behaviour.VlanQuery;
 import org.onosproject.net.device.DeviceEvent;
 import org.onosproject.net.device.DeviceListener;
@@ -43,11 +41,9 @@
 import org.slf4j.LoggerFactory;
 
 import java.util.Collections;
-import java.util.List;
 import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
-import java.util.stream.IntStream;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
@@ -58,17 +54,11 @@
 
     private static final Logger log = LoggerFactory.getLogger(ResourceDeviceListener.class);
 
-    private static final int TOTAL_ODU2_TRIBUTARY_SLOTS = 8;
-    private static final int TOTAL_ODU4_TRIBUTARY_SLOTS = 80;
-    private static final List<TributarySlot> ENTIRE_ODU2_TRIBUTARY_SLOTS = getEntireOdu2TributarySlots();
-    private static final List<TributarySlot> ENTIRE_ODU4_TRIBUTARY_SLOTS = getEntireOdu4TributarySlots();
-
     private final ResourceAdminService adminService;
     private final DeviceService deviceService;
     private final DriverService driverService;
     private final ExecutorService executor;
 
-
     /**
      * Creates an instance with the specified ResourceAdminService and ExecutorService.
      *
@@ -156,31 +146,15 @@
             }
 
             // for Tributary slots
-            // TODO: need to define Behaviour to make a query about OCh port
-            switch (port.type()) {
-                case OCH:
-                    // register ODU TributarySlots against the OCH port
-                    registerTributarySlotsResources(((OchPort) port).signalType(), portPath);
-                    break;
-                default:
-                    break;
+            Set<TributarySlot> tSlots = queryTributarySlots(device.id(), port.number());
+            if (!tSlots.isEmpty()) {
+                adminService.registerResources(tSlots.stream()
+                                               .map(portPath::child)
+                                               .collect(Collectors.toList()));
             }
         });
     }
 
-    private void registerTributarySlotsResources(OduSignalType oduSignalType, ResourcePath portPath) {
-        switch (oduSignalType) {
-            case ODU2:
-                adminService.registerResources(Lists.transform(ENTIRE_ODU2_TRIBUTARY_SLOTS, portPath::child));
-                break;
-            case ODU4:
-                adminService.registerResources(Lists.transform(ENTIRE_ODU4_TRIBUTARY_SLOTS, portPath::child));
-                break;
-            default:
-                break;
-        }
-    }
-
     private void unregisterPortResource(Device device, Port port) {
         ResourcePath resource = ResourcePath.discrete(device.id(), port.number());
         executor.submit(() -> adminService.unregisterResources(resource));
@@ -260,14 +234,26 @@
         }
     }
 
-    private static List<TributarySlot> getEntireOdu2TributarySlots() {
-        return IntStream.rangeClosed(1, TOTAL_ODU2_TRIBUTARY_SLOTS)
-                .mapToObj(TributarySlot::of)
-                .collect(Collectors.toList());
-    }
-    private static List<TributarySlot> getEntireOdu4TributarySlots() {
-        return IntStream.rangeClosed(1, TOTAL_ODU4_TRIBUTARY_SLOTS)
-                .mapToObj(TributarySlot::of)
-                .collect(Collectors.toList());
+    private Set<TributarySlot> queryTributarySlots(DeviceId device, PortNumber port) {
+        try {
+            // DriverHandler does not provide a way to check if a
+            // behaviour is supported.
+            Driver driver = driverService.getDriver(device);
+            if (driver == null || !driver.hasBehaviour(TributarySlotQuery.class)) {
+                return Collections.emptySet();
+            }
+            DriverHandler handler = driverService.createHandler(device);
+            if (handler == null) {
+                return Collections.emptySet();
+            }
+            TributarySlotQuery query = handler.behaviour(TributarySlotQuery.class);
+            if (query != null) {
+                return query.queryTributarySlots(port);
+            } else {
+                return Collections.emptySet();
+            }
+        } catch (ItemNotFoundException e) {
+            return Collections.emptySet();
+        }
     }
 }
diff --git a/drivers/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java b/drivers/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java
new file mode 100644
index 0000000..b5f0f48
--- /dev/null
+++ b/drivers/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2015 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.driver.query;
+
+import org.onlab.util.GuavaCollectors;
+import org.onosproject.net.OchPort;
+import org.onosproject.net.OduSignalType;
+import org.onosproject.net.Port;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.TributarySlot;
+import org.onosproject.net.device.DeviceService;
+import org.onosproject.net.driver.AbstractHandlerBehaviour;
+import org.onosproject.net.behaviour.TributarySlotQuery;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.Set;
+import java.util.stream.IntStream;
+
+/**
+ * TributarySlotQuery implementation which responds that all slots of ODU2 or ODU4 are available for the port.
+ */
+public class DefaultTributarySlotQuery extends AbstractHandlerBehaviour implements TributarySlotQuery {
+
+    private static final Logger log = LoggerFactory.getLogger(DefaultTributarySlotQuery.class);
+
+    private static final int TOTAL_ODU2_TRIBUTARY_SLOTS = 8;
+    private static final int TOTAL_ODU4_TRIBUTARY_SLOTS = 80;
+
+    private static Set<TributarySlot> getEntireOdu2TributarySlots() {
+        return IntStream.rangeClosed(1, TOTAL_ODU2_TRIBUTARY_SLOTS)
+                .mapToObj(TributarySlot::of)
+                .collect(GuavaCollectors.toImmutableSet());
+    }
+
+    private static Set<TributarySlot> getEntireOdu4TributarySlots() {
+        return IntStream.rangeClosed(1, TOTAL_ODU4_TRIBUTARY_SLOTS)
+                .mapToObj(TributarySlot::of)
+                .collect(GuavaCollectors.toImmutableSet());
+    }
+
+    private static final Set<TributarySlot> ENTIRE_ODU2_TRIBUTARY_SLOTS = getEntireOdu2TributarySlots();
+    private static final Set<TributarySlot> ENTIRE_ODU4_TRIBUTARY_SLOTS = getEntireOdu4TributarySlots();
+
+    @Override
+    public Set<TributarySlot> queryTributarySlots(PortNumber port) {
+        // currently return all slots by default.
+        DeviceService deviceService = this.handler().get(DeviceService.class);
+        Port p = deviceService.getPort(this.data().deviceId(), port);
+
+        if (!(p instanceof OchPort)) {
+            return Collections.emptySet();
+        }
+        OduSignalType signalType = ((OchPort) p).signalType();
+        switch (signalType) {
+            case ODU2:
+                return ENTIRE_ODU2_TRIBUTARY_SLOTS;
+            case ODU4:
+                return ENTIRE_ODU4_TRIBUTARY_SLOTS;
+            default:
+                log.error("Unsupported signal type {}", signalType);
+                return Collections.emptySet();
+        }
+    }
+}
\ No newline at end of file
diff --git a/drivers/src/main/resources/onos-drivers.xml b/drivers/src/main/resources/onos-drivers.xml
index b64fe34..423ec85 100644
--- a/drivers/src/main/resources/onos-drivers.xml
+++ b/drivers/src/main/resources/onos-drivers.xml
@@ -173,6 +173,8 @@
             manufacturer="ECI Telecom" hwVersion="Optical.*" swVersion="V_1_0">
         <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
                    impl="org.onosproject.driver.handshaker.OFOpticalSwitch13"/>
+        <behaviour api="org.onosproject.net.behaviour.TributarySlotQuery"
+                   impl="org.onosproject.driver.query.DefaultTributarySlotQuery" />
     </driver>
     <driver name="aos" extends="ofdpa"
             manufacturer="Accton" hwVersion=".*" swVersion="1.*">
