minor fixes around optical

Change-Id: Ie1c9c57b021d27f672efeb25831594e177e5e784
diff --git a/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java b/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
index fa8d824..2776a19 100644
--- a/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
+++ b/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
@@ -334,6 +334,11 @@
 
         // create intents from cross connect points
         List<Intent> intents = createIntents(crossConnectPoints);
+        if (intents.isEmpty()) {
+            log.error("No intents produced from {}", crossConnectPoints);
+            return null;
+        }
+
 
         // create set of PacketLinkRealizedByOptical
         Set<PacketLinkRealizedByOptical> packetLinks = createPacketLinkSet(crossConnectPoints,
@@ -501,7 +506,7 @@
     }
 
     /**
-     * Verifies if given device type is in packet layer, i.e., switch or router device.
+     * Verifies if given device type is NOT in packet layer, i.e., switch or router device.
      *
      * @param type device type
      * @return true if in packet layer, false otherwise
diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/cli/AddOpticalIntentCommand.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/cli/AddOpticalIntentCommand.java
index 718cf20..5d38203 100644
--- a/apps/optical-model/src/main/java/org/onosproject/net/optical/cli/AddOpticalIntentCommand.java
+++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/cli/AddOpticalIntentCommand.java
@@ -56,15 +56,15 @@
     @SuppressWarnings("unused")
     private AllApplicationNamesCompleter appCompleter;
 
-    @Argument(index = 0, name = "ingressDevice",
+    @Argument(index = 0, name = "ingress",
               description = "Ingress Device/Port Description",
               required = true, multiValued = false)
-    String ingressDeviceString = "";
+    String ingressString = "";
 
-    @Argument(index = 1, name = "egressDevice",
+    @Argument(index = 1, name = "egress",
               description = "Egress Device/Port Description",
               required = true, multiValued = false)
-    String egressDeviceString = "";
+    String egressString = "";
 
     @Option(name = "-b", aliases = "--bidirectional",
             description = "If this argument is passed the optical link created will be bidirectional, " +
@@ -97,8 +97,8 @@
     protected void execute() {
         IntentService service = get(IntentService.class);
 
-        ConnectPoint ingress = createConnectPoint(ingressDeviceString);
-        ConnectPoint egress = createConnectPoint(egressDeviceString);
+        ConnectPoint ingress = createConnectPoint(ingressString);
+        ConnectPoint egress = createConnectPoint(egressString);
 
         if (ingress == null || egress == null) {
             print("Invalid endpoint(s); could not create optical intent");