diff --git a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
index 2e88c3a..96fc72e 100644
--- a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
@@ -115,7 +115,7 @@
 
     @Option(name = "-l", aliases = "--lambda", description = "Lambda",
             required = false, multiValued = false)
-    private boolean lambda = false;
+    private Boolean lambda = null;
 
     @Option(name = "-a", aliases = "--appId", description = "Application Id",
             required = false, multiValued = false)
@@ -189,7 +189,7 @@
         // Set the default EthType based on the IP version if the matching
         // source or destination IP prefixes.
         //
-        short ethType = EthType.IPV4.value();
+        Short ethType = null;
         if ((srcIpPrefix != null) && srcIpPrefix.isIp6()) {
             ethType = EthType.IPV6.value();
         }
@@ -199,8 +199,9 @@
         if (!isNullOrEmpty(ethTypeString)) {
             ethType = EthType.parseFromString(ethTypeString);
         }
-        selectorBuilder.matchEthType(ethType);
-
+        if (ethType != null) {
+            selectorBuilder.matchEthType(ethType);
+        }
         if (!isNullOrEmpty(srcMacString)) {
             selectorBuilder.matchEthSrc(MacAddress.valueOf(srcMacString));
         }
@@ -312,11 +313,12 @@
         }
 
         // Check for a lambda specification
-        if (lambda) {
-            constraints.add(new LambdaConstraint(null));
+        if (lambda != null) {
+            if (lambda) {
+                constraints.add(new LambdaConstraint(null));
+            }
+            constraints.add(new LinkTypeConstraint(lambda, Link.Type.OPTICAL));
         }
-        constraints.add(new LinkTypeConstraint(lambda, Link.Type.OPTICAL));
-
         return constraints;
     }
 
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
index 74ec8f7..af9a07e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
@@ -24,6 +24,7 @@
 import org.onlab.util.PositionalParameterStringFormatter;
 import org.onosproject.net.Link;
 import org.onosproject.net.LinkKey;
+import org.onosproject.net.Port;
 import org.onosproject.net.intent.IntentId;
 import org.onosproject.net.link.LinkService;
 import org.onosproject.net.resource.link.BandwidthResource;
@@ -140,14 +141,15 @@
 
     private Set<LambdaResourceAllocation> getLambdaResourceCapacity(Link link) {
         Set<LambdaResourceAllocation> allocations = new HashSet<>();
+        Port port = deviceService.getPort(link.src().deviceId(), link.src().port());
+        if (port instanceof OmsPort) {
+            OmsPort omsPort = (OmsPort) port;
 
-        OmsPort port = (OmsPort) deviceService.getPort(link.src().deviceId(), link.src().port());
-
-        // Assume fixed grid for now
-        for (int i = 0; i < port.totalChannels(); i++) {
-            allocations.add(new LambdaResourceAllocation(LambdaResource.valueOf(i)));
+            // Assume fixed grid for now
+            for (int i = 0; i < omsPort.totalChannels(); i++) {
+                allocations.add(new LambdaResourceAllocation(LambdaResource.valueOf(i)));
+            }
         }
-
         return allocations;
     }
 
