Adding Modulation to UI

Change-Id: I651dc44dd8f784962f4bc74bcbf246441a236707
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniModulationConfig.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniModulationConfig.java
index a271132..0149566 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniModulationConfig.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/CassiniModulationConfig.java
@@ -205,7 +205,7 @@
                     .append("</filter>")
                     .append("</get>")
                     .append(RPC_CLOSE_TAG);
-            log.info("RPC Call for Getting Modulation : \n {}", rpcReq.toString());
+            log.debug("RPC Call for Getting Modulation : \n {}", rpcReq.toString());
             XMLConfiguration xconf = NetconfSessionUtility.executeRpc(session, rpcReq.toString());
             try {
                 HierarchicalConfiguration config =
@@ -420,9 +420,11 @@
                     .append(RPC_CLOSE_TAG);
             log.info("RPC call for Setting Modulation : {}", rpcReq.toString());
             XMLConfiguration xconf = NetconfSessionUtility.executeRpc(session, rpcReq.toString());
-
-            // The successful reply should be "<rpc-reply ...><ok /></rpc-reply>"
-            if (!xconf.getRoot().getChild(0).getName().equals("ok")) {
+            if (xconf == null) {
+                log.error("The <edit-config> operation to set target-modulation of Port({}:{}) is failed.",
+                        port.toString(), component.toString());
+            } else if (!xconf.getRoot().getChild(0).getName().equals("ok")) {
+                    // The successful reply should be "<rpc-reply ...><ok /></rpc-reply>"
                 response = false;
                 log.error("The <edit-config> operation to set target-modulation of Port({}:{}) is failed.",
                         port.toString(), component.toString());
diff --git a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/util/NetconfSessionUtility.java b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/util/NetconfSessionUtility.java
index 786c999..6c9500c 100644
--- a/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/util/NetconfSessionUtility.java
+++ b/drivers/odtn-driver/src/main/java/org/onosproject/drivers/odtn/util/NetconfSessionUtility.java
@@ -48,7 +48,7 @@
      */
     public static NetconfSession getNetconfSession(DeviceId deviceId,
                                                    NetconfController controller) {
-        log.info("Inside getNetconfSession () method for device : {}", deviceId);
+        log.debug("Inside getNetconfSession () method for device : {}", deviceId);
         NetconfDevice ncdev = controller.getDevicesMap().get(deviceId);
         if (ncdev == null) {
             log.trace("No netconf device, returning null session");
@@ -77,7 +77,7 @@
         } catch (InterruptedException ie) {
             log.error("Interrupted Exception: {}.", ie);
         } catch (ExecutionException ee) {
-            log.error("Concurrent Exception while executing Netconf operation: {}.", ee);
+            log.error("Concurrent Exception while executing Netconf operation: {}.", ee.getCause());
         }
         return null;
     }