[ONOS-4160] PCE REST

Change-Id: Iec0554190876c7363114c03aa5d2b25b42ade071
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceDeletePathCommand.java b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceDeletePathCommand.java
index 012fd28..2f0be92 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceDeletePathCommand.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceDeletePathCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright 2016-present 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.
@@ -21,6 +21,7 @@
 import org.apache.karaf.shell.commands.Command;
 
 import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.incubator.net.tunnel.TunnelId;
 import org.onosproject.pce.pceservice.api.PceService;
 
 import org.slf4j.Logger;
@@ -41,10 +42,9 @@
 
         PceService service = get(PceService.class);
 
-        //TODO: need to uncomment below lines once releasePath method is added to PceService
-        //if (!service.releasePath(PcePathId.of(id))) {
-        //    error("Path deletion failed.");
-        //    return;
-        //}
+        if (!service.releasePath(TunnelId.valueOf(id))) {
+            error("Path deletion failed.");
+            return;
+        }
     }
 }
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceQueryPathCommand.java b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceQueryPathCommand.java
index b7dc3a9..32323fa 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceQueryPathCommand.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceQueryPathCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright 2016-present 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.
@@ -22,6 +22,7 @@
 
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.incubator.net.tunnel.Tunnel;
+import org.onosproject.incubator.net.tunnel.TunnelId;
 import org.onosproject.net.AnnotationKeys;
 import org.onosproject.pce.pceservice.api.PceService;
 
@@ -45,8 +46,7 @@
 
         PceService service = get(PceService.class);
         if (null == id) {
-            //TODO: need to uncomment below line once queryAllPath method is added to PceService
-            Iterable<Tunnel> tunnels = null; // = service.queryAllPath();
+            Iterable<Tunnel> tunnels = service.queryAllPath();
             if (tunnels != null) {
                 for (final Tunnel tunnel : tunnels) {
                     display(tunnel);
@@ -56,8 +56,7 @@
                 return;
             }
         } else {
-            //TODO: need to uncomment below line once queryPath method is added to PceService
-            Tunnel tunnel = null; // = service.queryPath(PcePathId.of(id));
+            Tunnel tunnel = service.queryPath(TunnelId.valueOf(id));
             if (tunnel == null) {
                 print("Path doesnot exists.");
                 return;
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceSetupPathCommand.java b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceSetupPathCommand.java
index 5bf13ff..497905f 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceSetupPathCommand.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceSetupPathCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright 2016-present 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.
@@ -86,9 +86,8 @@
             //listConstrnt.add(LocalBandwidthConstraint.of(bandwidth, DataRateUnit.valueOf("BPS")));
         }
 
-        //TODO: need to uncomment below lines once setupPath method is modified in PceService
-        //if (null == service.setupPath(srcDevice, dstDevice, name, listConstrnt, lspType)) {
-        //    error("Path creation failed.");
-        //}
+        if (!service.setupPath(srcDevice, dstDevice, name, listConstrnt, lspType)) {
+            error("Path creation failed.");
+        }
     }
 }
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceUpdatePathCommand.java b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceUpdatePathCommand.java
index e1dcd65..5ea8686 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceUpdatePathCommand.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/cli/PceUpdatePathCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright 2016-present 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.
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/cli/package-info.java b/apps/pce/app/src/main/java/org/onosproject/pce/cli/package-info.java
index d5c85c4..2db38908 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/cli/package-info.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/cli/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright 2016-present 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.