diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java
index c106202..ab0a986 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceDescriptionDiscovery.java
@@ -22,20 +22,18 @@
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import org.onlab.packet.ChassisId;
+import org.onosproject.net.DefaultAnnotations;
 import org.onosproject.net.Device;
-import org.onosproject.net.PortNumber;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.device.PortDescription;
+import org.onosproject.net.OchSignal;
+import org.onosproject.net.OduSignalType;
+import org.onosproject.net.PortNumber;
 import org.onosproject.net.device.DefaultDeviceDescription;
 import org.onosproject.net.device.DeviceDescription;
 import org.onosproject.net.device.DeviceDescriptionDiscovery;
 import org.onosproject.net.device.DeviceService;
+import org.onosproject.net.device.PortDescription;
 import org.onosproject.net.driver.AbstractHandlerBehaviour;
-import org.onosproject.net.OchSignal;
-import org.onosproject.net.OduSignalType;
-import org.onosproject.net.GridType;
-import org.onosproject.net.ChannelSpacing;
-import org.onosproject.net.DefaultAnnotations;
 import org.onosproject.protocol.rest.RestSBController;
 import org.slf4j.Logger;
 
@@ -46,24 +44,16 @@
 import java.util.List;
 
 import static com.google.common.base.Preconditions.checkNotNull;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.CONTEXT;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.LAYER_PROTOCOL_NAME;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.AVAILABLE_SPECTRUM;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.ADJUSTMENT_GRANULARITY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.BASE_FREQUENCY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.FREQUENCY_CONSTRAINT;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.GRID_TYPE;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.LOWER_FREQUENCY;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MC_POOL;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.PHOTONIC_LAYER_QUALIFIER_NMC;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.PHOTONIC_MEDIA;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.SERVICE_INTERFACE_POINT;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.SUPPORTED_LAYER_PROTOCOL_QUALIFIER;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UPPER_FREQUENCY;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UUID;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.toMbpsFromHz;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.getChannelSpacing;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.getSlotGranularity;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.getOchSignal;
 import static org.onosproject.net.optical.device.OchPortHelper.ochPortDescription;
 import static org.slf4j.LoggerFactory.getLogger;
 
@@ -77,9 +67,7 @@
         implements DeviceDescriptionDiscovery {
 
     private static final Logger log = getLogger(TapiDeviceDescriptionDiscovery.class);
-    private static final String SIP_REQUEST_DATA_API = "/data/context/";
-    private static PortNumber nPort = PortNumber.portNumber(1);
-    private static final Object N_PORT_LOCK = new Object();
+    private static final String SIP_REQUEST_DATA_API = "/restconf/data/tapi-common:context";
 
     /**
      * Get the deviceId for which the methods apply.
@@ -98,9 +86,10 @@
         Device device = deviceService.getDevice(deviceId);
 
         if (device == null) {
+            //TODO need to obtain from the device.
             return new DefaultDeviceDescription(deviceId.uri(),
                     Device.Type.OLS,
-                    "tapi-swagger",
+                    "Tapi",
                     "0",
                     "2.1",
                     "Unknown",
@@ -125,6 +114,10 @@
         try {
             InputStream inputStream = controller.get(deviceId, SIP_REQUEST_DATA_API, MediaType.APPLICATION_JSON_TYPE);
             JsonNode jsonNode = new ObjectMapper().readTree(inputStream);
+            if (jsonNode == null) {
+                log.error("Can't discover port details at {}", SIP_REQUEST_DATA_API);
+                return ImmutableList.of();
+            }
             return parseTapiPorts(jsonNode);
         } catch (IOException e) {
             log.error("Exception discoverPortDetails() {}", did(), e);
@@ -134,39 +127,28 @@
 
     protected List<PortDescription> parseTapiPorts(JsonNode tapiContext) {
         List<PortDescription> ports = Lists.newArrayList();
-        int counter = 0;
-
-        /**
+        /*
          This annotations are used to store persistent mapping information between TAPI SIP's uuid
          and ONOS device portNumbers. This is needed to be publicly available at least within ODTN app
          when connectivity services will be sent to OLS Controller.
-         **/
+         */
         DefaultAnnotations.Builder annotations = DefaultAnnotations.builder();
-
-        JsonNode sips = tapiContext.get(SERVICE_INTERFACE_POINT);
-        Iterator<JsonNode> iter = sips.iterator();
+        Iterator<JsonNode> iter = tapiContext.get(CONTEXT).get(SERVICE_INTERFACE_POINT).iterator();
         while (iter.hasNext()) {
             JsonNode sipAttributes = iter.next();
             if (checkValidEndpoint(sipAttributes)) {
                 String uuid = sipAttributes.get(UUID).textValue();
+                PortNumber portNumber = PortNumber.portNumber(uuid.split("-")[0]);
+                annotations.set(UUID, uuid);
+
                 JsonNode mcPool = sipAttributes.get(MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC).get(MC_POOL);
+                // We get the first OCH signal as reported by the device.
+                OchSignal ochSignal = getOchSignal(mcPool).iterator().next();
+                //add och port
+                ports.add(ochPortDescription(portNumber, true, OduSignalType.ODU4,
+                        false, ochSignal, annotations.build()));
 
-                /*We create a sample OChSignal in the first position of the 50GHz DWDM Grid,
-                this should be replace for a OChSignal construct which has undefined spectrum.
-                OchSignal ochSignal = new OchSignal(GridType.DWDM, ChannelSpacing.CHL_50GHZ,
-                        0, 1);*/
 
-                OchSignal ochSignal = getOchSignal(mcPool);
-                synchronized (N_PORT_LOCK) {
-                    //annotations(portNumber-uuid)
-                    annotations.set(UUID, uuid);
-
-                    //add och port
-                    ports.add(ochPortDescription(nPort, true, OduSignalType.ODU4,
-                            false, ochSignal, annotations.build()));
-
-                    nPort = PortNumber.portNumber(counter++);
-                }
             } else {
                 log.error("SIP {} is not valid", sipAttributes);
             }
@@ -183,52 +165,11 @@
      * [PHOTONIC_LAYER_QUALIFIER_NMC, PHOTONIC_LAYER_QUALIFIER_NMCA, PHOTONIC_LAYER_QUALIFIER_OTSI...]
      **/
     private boolean checkValidEndpoint(JsonNode sipAttributes) {
-        return (sipAttributes.get(LAYER_PROTOCOL_NAME).toString().contains(PHOTONIC_MEDIA) &&
+        return sipAttributes.has(LAYER_PROTOCOL_NAME) &&
+                sipAttributes.get(LAYER_PROTOCOL_NAME).toString().contains(PHOTONIC_MEDIA) &&
+                sipAttributes.has(SUPPORTED_LAYER_PROTOCOL_QUALIFIER) &&
                 sipAttributes.get(SUPPORTED_LAYER_PROTOCOL_QUALIFIER).toString()
-                        .contains(PHOTONIC_LAYER_QUALIFIER_NMC));
-    }
-
-    /**
-     * If SIP info match our criteria, SIP component shall includes mc-pool information which must be obtained in order
-     * to complete the OchSignal info. with the TAPI SIP information included in spectrum-supported, spectrum-available
-     * and spectrum-occupied tapi objects.
-     **/
-    private OchSignal getOchSignal(JsonNode mcPool) {
-        long availableUpperFrec = 0;
-        long availableLowerFrec = 0;
-        String availableAdjustmentGranularity = "";
-        String availableGridType = "";
-        JsonNode availableSpectrum = mcPool.get(AVAILABLE_SPECTRUM);
-
-        /**At this time only the latest availableSpectrum is used**/
-        Iterator<JsonNode> iterAvailable = availableSpectrum.iterator();
-        while (iterAvailable.hasNext()) {
-            JsonNode availableSpec = iterAvailable.next();
-            availableUpperFrec = availableSpec.get(UPPER_FREQUENCY).asLong();
-            availableLowerFrec = availableSpec.get(LOWER_FREQUENCY).asLong();
-            availableAdjustmentGranularity = availableSpec.get(FREQUENCY_CONSTRAINT)
-                    .get(ADJUSTMENT_GRANULARITY).textValue();
-            availableGridType = availableSpec.get(FREQUENCY_CONSTRAINT).get(GRID_TYPE).textValue();
-        }
-
-        int spacingMult = 0;
-        int slotGranularity = 1;
-        ChannelSpacing chSpacing = getChannelSpacing(availableAdjustmentGranularity);
-        long spacingFrequency = chSpacing.frequency().asHz();
-        long centralFrequency = (availableUpperFrec - (availableUpperFrec - availableLowerFrec) / 2);
-
-        GridType gridType = GridType.valueOf(availableGridType);
-        if (gridType == GridType.DWDM) {
-            spacingMult = (int) ((centralFrequency - BASE_FREQUENCY) / toMbpsFromHz(spacingFrequency));
-        } else if (gridType == GridType.CWDM) {
-            log.warn("GridType CWDM. Not implemented");
-        } else if (gridType == GridType.FLEX) {
-            log.warn("GridType FLEX. Not implemented");
-            slotGranularity = getSlotGranularity(chSpacing);
-        } else {
-            log.warn("Unknown GridType");
-        }
-        return new OchSignal(gridType, chSpacing, spacingMult, slotGranularity);
+                        .contains(PHOTONIC_LAYER_QUALIFIER_NMC);
     }
 
 }
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceHelper.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceHelper.java
index d4e9c06..dee318c 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceHelper.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceHelper.java
@@ -17,17 +17,31 @@
  */
 package org.onosproject.drivers.odtn.tapi;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import org.onosproject.net.ChannelSpacing;
+import org.onosproject.net.GridType;
+import org.onosproject.net.OchSignal;
+import org.slf4j.Logger;
+
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.stream.IntStream;
+
+import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Tapi 2.1 OLS device related helpers.
  */
 public final class TapiDeviceHelper {
 
+    private static final Logger log = getLogger(TapiDeviceHelper.class);
+
     public static final String SERVICE_INTERFACE_POINT = "service-interface-point";
+    public static final String CONTEXT = "tapi-common:context";
     public static final String UUID = "uuid";
     public static final String MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC =
-            "media-channel-service-interface-point-spec";
+            "tapi-photonic-media:media-channel-service-interface-point-spec";
     public static final String MC_POOL = "mc-pool";
     public static final String LAYER_PROTOCOL_NAME = "layer-protocol-name";
     public static final String PHOTONIC_MEDIA = "PHOTONIC_MEDIA";
@@ -38,7 +52,6 @@
     public static final String ADJUSTMENT_GRANULARITY = "adjustment-granularity";
     public static final String UPPER_FREQUENCY = "upper-frequency";
     public static final String LOWER_FREQUENCY = "lower-frequency";
-    public static final String AVAILABLE_SPECTRUM = "available-spectrum";
     public static final long BASE_FREQUENCY = 193100000;   //Working in Mhz
     public static final String TAPI_CONNECTIVITY_CONNECTIVITY_SERVICE = "tapi-connectivity:connectivity-service";
     public static final String END_POINT = "end-point";
@@ -50,6 +63,8 @@
     public static final String TAPI_PHOTONIC_MEDIA_PHOTONIC_LAYER_QUALIFIER_NMC =
             "tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC";
     public static final String SERVICE_INTERFACE_POINT_UUID = "service-interface-point-uuid";
+    public static final String AVAILABLE_SPECTRUM = "available-spectrum";
+    protected static final String SUPPORTABLE_SPECTRUM = "supportable-spectrum";
 
     private TapiDeviceHelper(){}
 
@@ -105,4 +120,57 @@
     public static long toMbpsFromHz(long speed) {
         return speed / 1000000;
     }
+
+    /**
+     * If SIP info match our criteria, SIP component shall includes mc-pool information which must be obtained in order
+     * to complete the OchSignal info. with the TAPI SIP information included in spectrum-supported, spectrum-available
+     * and spectrum-occupied tapi objects.
+     *
+     * @param mcPool the MC_POOL json node
+     * @return the set of OCH signals given the port's information
+     **/
+    protected static Set<OchSignal> getOchSignal(JsonNode mcPool) {
+
+        Set<OchSignal> lambdas = new LinkedHashSet<>();
+        long availableUpperFrec = 0;
+        long availableLowerFrec = 0;
+        String availableAdjustmentGranularity = "";
+        String availableGridType = "";
+        JsonNode availableSpectrum = mcPool.get(AVAILABLE_SPECTRUM);
+
+        if (availableSpectrum == null) {
+            availableSpectrum = mcPool.get(SUPPORTABLE_SPECTRUM);
+        }
+
+        Iterator<JsonNode> iterAvailable = availableSpectrum.iterator();
+        while (iterAvailable.hasNext()) {
+            JsonNode availableSpec = iterAvailable.next();
+            availableUpperFrec = availableSpec.get(UPPER_FREQUENCY).asLong();
+            availableLowerFrec = availableSpec.get(LOWER_FREQUENCY).asLong();
+            log.info("availableUpperFrec {}, availableLowerFrec {}", availableUpperFrec,
+                    availableLowerFrec);
+            availableAdjustmentGranularity = availableSpec.get(FREQUENCY_CONSTRAINT)
+                    .get(ADJUSTMENT_GRANULARITY).textValue();
+            availableGridType = availableSpec.get(FREQUENCY_CONSTRAINT).get(GRID_TYPE).textValue();
+
+            int slotGranularity;
+            ChannelSpacing chSpacing = getChannelSpacing(availableAdjustmentGranularity);
+            double spacingFrequency = chSpacing.frequency().asGHz();
+            int lambdaCount = (int) ((availableUpperFrec - availableLowerFrec) / spacingFrequency);
+            GridType gridType = GridType.valueOf(availableGridType);
+            if (gridType == GridType.DWDM) {
+                slotGranularity = getSlotGranularity(chSpacing);
+                int finalSlotGranularity = slotGranularity;
+                IntStream.range(0, lambdaCount).forEach(x -> lambdas.add(new OchSignal(GridType.DWDM, chSpacing,
+                        x - (lambdaCount / 2), finalSlotGranularity)));
+            } else if (gridType == GridType.CWDM) {
+                log.warn("GridType CWDM. Not implemented");
+            } else if (gridType == GridType.FLEX) {
+                log.warn("GridType FLEX. Not implemented");
+            } else {
+                log.warn("Unknown GridType");
+            }
+        }
+        return lambdas;
+    }
 }
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceLambdaQuery.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceLambdaQuery.java
index fa46b87..5f0f52e 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceLambdaQuery.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiDeviceLambdaQuery.java
@@ -17,46 +17,30 @@
  */
 package org.onosproject.drivers.odtn.tapi;
 
-import com.google.common.collect.ImmutableSet;
-import org.onosproject.net.Port;
-import org.onosproject.net.Device;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.ChannelSpacing;
-import org.onosproject.net.GridType;
-import org.onosproject.net.OchSignal;
-import org.onosproject.net.PortNumber;
-import org.onosproject.net.behaviour.LambdaQuery;
-import org.onosproject.net.driver.AbstractHandlerBehaviour;
-import org.onosproject.protocol.rest.RestSBController;
-
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableSet;
+import org.onosproject.net.Device;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.OchSignal;
+import org.onosproject.net.Port;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.behaviour.LambdaQuery;
+import org.onosproject.net.device.DeviceService;
+import org.onosproject.net.driver.AbstractHandlerBehaviour;
+import org.onosproject.protocol.rest.RestSBController;
 import org.slf4j.Logger;
 
+import javax.ws.rs.core.MediaType;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
 import java.util.Set;
 
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.AVAILABLE_SPECTRUM;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.ADJUSTMENT_GRANULARITY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.BASE_FREQUENCY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.FREQUENCY_CONSTRAINT;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.GRID_TYPE;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.LOWER_FREQUENCY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MC_POOL;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UPPER_FREQUENCY;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UUID;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.toMbpsFromHz;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.getChannelSpacing;
-import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.getSlotGranularity;
-
-import static org.slf4j.LoggerFactory.getLogger;
 import static com.google.common.base.Preconditions.checkNotNull;
-import org.onosproject.net.device.DeviceService;
-import javax.ws.rs.core.MediaType;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MC_POOL;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC;
+import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UUID;
+import static org.slf4j.LoggerFactory.getLogger;
 
 
 
@@ -67,7 +51,7 @@
         implements LambdaQuery {
 
     private static final Logger log = getLogger(TapiDeviceLambdaQuery.class);
-    private static final String SIP_REQUEST_DATA_API = "/data/context/service-interface-point=";
+    private static final String SIP_REQUEST_DATA_API = "/restconf/data/tapi-common:context/service-interface-point=";
 
     /**
      * Get the deviceId for which the methods apply.
@@ -103,9 +87,7 @@
             JsonNode mcPool = sipAttributes.get(MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC).get(MC_POOL);
 
             //This creates a hashset of OChSignals representing the spectrum availability at the target port.
-            Set<OchSignal> lambdas = getOchSignal(mcPool);
-            log.debug("Lambdas: {}", lambdas.toString());
-            return lambdas;
+            return TapiDeviceHelper.getOchSignal(mcPool);
 
         } catch (IOException e) {
             log.error("Exception discoverPortDetails() {}", did(), e);
@@ -113,51 +95,5 @@
         }
     }
 
-    /**
-     * If SIP info match our criteria, SIP component shall includes mc-pool information which must be obtained in order
-     * to complete the OchSignal info. with the TAPI SIP information included in spectrum-supported, spectrum-available
-     * and spectrum-occupied tapi objects.
-     **/
-    private Set<OchSignal> getOchSignal(JsonNode mcPool) {
-
-        Set<OchSignal> lambdas = new LinkedHashSet<>();
-        long availableUpperFrec = 0;
-        long availableLowerFrec = 0;
-        String availableAdjustmentGranularity = "";
-        String availableGridType = "";
-        JsonNode availableSpectrum = mcPool.get(AVAILABLE_SPECTRUM);
-
-        /**At this time only the latest availableSpectrum is used**/
-        Iterator<JsonNode> iterAvailable = availableSpectrum.iterator();
-        while (iterAvailable.hasNext()) {
-            JsonNode availableSpec = iterAvailable.next();
-            availableUpperFrec = availableSpec.get(UPPER_FREQUENCY).asLong();
-            availableLowerFrec = availableSpec.get(LOWER_FREQUENCY).asLong();
-            availableAdjustmentGranularity = availableSpec.get(FREQUENCY_CONSTRAINT)
-                    .get(ADJUSTMENT_GRANULARITY).textValue();
-            availableGridType = availableSpec.get(FREQUENCY_CONSTRAINT).get(GRID_TYPE).textValue();
-
-            int spacingMult = 0;
-            int slotGranularity = 1;
-            ChannelSpacing chSpacing = getChannelSpacing(availableAdjustmentGranularity);
-            long spacingFrequency = chSpacing.frequency().asHz();
-            long centralFrequency = (availableUpperFrec - (availableUpperFrec - availableLowerFrec) / 2);
-
-            GridType gridType = GridType.valueOf(availableGridType);
-            if (gridType == GridType.DWDM) {
-                spacingMult = (int) ((centralFrequency - BASE_FREQUENCY) / toMbpsFromHz(spacingFrequency));
-                OchSignal ochSignal = new OchSignal(gridType, chSpacing, spacingMult, slotGranularity);
-                lambdas.add(ochSignal);
-            } else if (gridType == GridType.CWDM) {
-                log.warn("GridType CWDM. Not implemented");
-            } else if (gridType == GridType.FLEX) {
-                log.warn("GridType FLEX. Not implemented");
-                slotGranularity = getSlotGranularity(chSpacing);
-            } else {
-                log.warn("Unknown GridType");
-            }
-        }
-        return lambdas;
-    }
 
 }
\ No newline at end of file
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiFlowRuleProgrammable.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiFlowRuleProgrammable.java
index c0bea12..d415738 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiFlowRuleProgrammable.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/tapi/TapiFlowRuleProgrammable.java
@@ -21,8 +21,6 @@
 import com.fasterxml.jackson.core.JsonFactory;
 import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectReader;
 import com.google.common.collect.ImmutableList;
 import org.apache.http.HttpStatus;
 import org.onosproject.drivers.odtn.impl.DeviceConnection;
@@ -45,13 +43,13 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.END_POINT;
@@ -82,42 +80,50 @@
     private static final String CONN_REQ_REMOVE_DATA_API = "/restconf/data/tapi-common:context/" +
             "tapi-connectivity:connectivity-context/connectivity-service=";
     private static final String CONN_REQ_GET_API = "/restconf/data/tapi-common:context/" +
-            "tapi-connectivity:connectivity-context/";
+            "tapi-connectivity:connectivity-context/connectivity-service/";
 
 
     @Override
     public Collection<FlowEntry> getFlowEntries() {
         DeviceId deviceId = did();
-        RestSBController controller = checkNotNull(handler().get(RestSBController.class));
-        ObjectMapper om = new ObjectMapper();
-        final ObjectReader reader = om.reader();
-        // all waveserver responses contain data node, which contains the requested data
-        InputStream response = controller.get(deviceId, CONN_REQ_GET_API, MediaType.APPLICATION_JSON_TYPE);
-        JsonNode jsonNode = null;
-        try {
-            jsonNode = reader.readTree(response);
-            if (jsonNode == null) {
-                log.error("JsonNode is null for response {}", response);
-                return ImmutableList.of();
-            }
-            Set<String> uuids = parseTapiGetConnectivityRequest(jsonNode);
-            DeviceConnectionCache cache = getConnectionCache();
-            if (cache.get(deviceId) == null) {
-                return ImmutableList.of();
-            }
-            List<FlowEntry> entries = new ArrayList<>();
-            uuids.forEach(uuid -> {
-                FlowRule rule = cache.get(deviceId, uuid);
-                if (rule != null) {
-                    entries.add(new DefaultFlowEntry(rule, FlowEntry.FlowEntryState.ADDED, 0, 0, 0));
-                } else {
-                    log.info("Non existing rule for uuid {}", uuid);
-                }
+        //TODO this is a blocking call on ADVA OLS, right now using cache.
+//        RestSBController controller = checkNotNull(handler().get(RestSBController.class));
+//        ObjectMapper om = new ObjectMapper();
+//        final ObjectReader reader = om.reader();
+//        InputStream response = controller.get(deviceId, CONN_REQ_GET_API, MediaType.APPLICATION_JSON_TYPE);
+//        JsonNode jsonNode = null;
+//        try {
+//            jsonNode = reader.readTree(response);
+//            if (jsonNode == null) {
+//                log.debug("JsonNode is null for response {}", response);
+//                return ImmutableList.of();
+//            }
+//            Set<String> uuids = parseTapiGetConnectivityRequest(jsonNode);
+//            DeviceConnectionCache cache = getConnectionCache();
+//            if (cache.get(deviceId) == null) {
+//                return ImmutableList.of();
+//            }
+//            List<FlowEntry> entries = new ArrayList<>();
+//            uuids.forEach(uuid -> {
+//                FlowRule rule = cache.get(deviceId, uuid);
+//                if (rule != null) {
+//                    entries.add(new DefaultFlowEntry(rule, FlowEntry.FlowEntryState.ADDED, 0, 0, 0));
+//                } else {
+//                    log.info("Non existing rule for uuid {}", uuid);
+//                }
+//            });
+//            return entries;
+//        } catch (IOException e) {
+//            return ImmutableList.of();
+//        }
+        List<FlowEntry> entries = new ArrayList<>();
+        Set<FlowRule> rules = getConnectionCache().get(deviceId);
+        if (rules != null) {
+            rules.forEach(rule -> {
+                entries.add(new DefaultFlowEntry(rule, FlowEntry.FlowEntryState.ADDED, 0, 0, 0));
             });
-            return entries;
-        } catch (IOException e) {
-            return ImmutableList.of();
         }
+        return entries;
     }
 
     @Override
@@ -129,18 +135,25 @@
             String uuid = createUuid();
             ByteArrayOutputStream applyConnectivityRequest = createConnectivityRequest(uuid, flowRule);
             if (applyConnectivityRequest.size() != 0) {
-                int result = controller.post(deviceId, CONN_REQ_POST_API,
+                CompletableFuture<Integer>  flowInstallation =
+                        CompletableFuture.supplyAsync(() -> controller.post(deviceId, CONN_REQ_POST_API,
                         new ByteArrayInputStream(applyConnectivityRequest.toByteArray()),
-                        MediaType.APPLICATION_JSON_TYPE);
+                        MediaType.APPLICATION_JSON_TYPE));
+                flowInstallation.thenApply(result -> {
+                    if (result == HttpStatus.SC_CREATED) {
+                        getConnectionCache().add(deviceId, uuid, flowRule);
+                        added.add(flowRule);
+                    } else {
+                       log.error("Can't add flow {}, result {}", flowRule, result);
+                    }
+                    return result;
+                });
                 // TODO retrieve the UUID from the location and store with that identifier
                 // at the moment is implied that the sent one is the same used by the TAPI server.
-                if (result == HttpStatus.SC_CREATED) {
-                    getConnectionCache().add(deviceId, uuid, flowRule);
-                    added.add(flowRule);
-                }
             }
         });
-        return added.build();
+        //TODO workaround for blocking call on ADVA OLS should return added
+        return rules;
     }
 
     @Override
@@ -155,14 +168,22 @@
                         flowRule.id(), deviceId);
                 return;
             }
-            int result = controller.delete(deviceId, CONN_REQ_REMOVE_DATA_API + conn.getId(),
-                    null, MediaType.APPLICATION_JSON_TYPE);
-            if (result == HttpStatus.SC_NO_CONTENT) {
-                getConnectionCache().remove(deviceId, flowRule);
-                removed.add(flowRule);
-            }
+            CompletableFuture<Integer>  flowInstallation =
+                    CompletableFuture.supplyAsync(() -> controller.delete(deviceId,
+                            CONN_REQ_REMOVE_DATA_API + conn.getId(),
+                            null, MediaType.APPLICATION_JSON_TYPE));
+            flowInstallation.thenApply(result -> {
+                if (result == HttpStatus.SC_NO_CONTENT) {
+                    getConnectionCache().remove(deviceId, flowRule);
+                    removed.add(flowRule);
+                } else {
+                    log.error("Can't remove flow {}, result {}", flowRule, result);
+                }
+                return result;
+            });
         });
-        return removed.build();
+        //TODO workaround for blocking call on ADVA OLS shoudl return removed
+        return rules;
     }
 
     /**
@@ -193,8 +214,8 @@
         if (tapiConnectivityReply.has(TAPI_CONNECTIVITY_CONNECTIVITY_SERVICE)) {
             tapiConnectivityReply.get(TAPI_CONNECTIVITY_CONNECTIVITY_SERVICE).elements()
                     .forEachRemaining(node -> uuids.add(node.get(TapiDeviceHelper.UUID).asText()));
-        } else {
-            log.warn("Cant retrieve connectivity UUID from {}", tapiConnectivityReply);
+        } else if (tapiConnectivityReply.size() != 0) {
+            log.warn("Can't retrieve connectivity UUID from {}", tapiConnectivityReply);
         }
         //This is only one uuid or empty in case of failures
         return uuids;
diff --git a/providers/rest/device/src/main/java/org/onosproject/provider/rest/device/impl/RestDeviceProvider.java b/providers/rest/device/src/main/java/org/onosproject/provider/rest/device/impl/RestDeviceProvider.java
index cd738cd..c89e59b 100644
--- a/providers/rest/device/src/main/java/org/onosproject/provider/rest/device/impl/RestDeviceProvider.java
+++ b/providers/rest/device/src/main/java/org/onosproject/provider/rest/device/impl/RestDeviceProvider.java
@@ -581,6 +581,16 @@
         return false;
     }
 
+    private Runnable exceptionSafe(Runnable runnable) {
+        return () -> {
+            try {
+                runnable.run();
+            } catch (Exception e) {
+                log.error("Unhandled Exception", e);
+            }
+        };
+    }
+
     private class InternalNetworkConfigListener implements NetworkConfigListener {
         @Override
         public void event(NetworkConfigEvent event) {
@@ -601,7 +611,7 @@
                         event.type(), event.config().get().subject());
                 RestDeviceConfig cfg = (RestDeviceConfig) event.config().get();
                 RestSBDevice restSBDevice = toInactiveRestSBDevice(cfg);
-                bg.execute(() -> connectDevice(restSBDevice));
+                bg.execute(exceptionSafe(() -> connectDevice(restSBDevice)));
             }
         }
 
