Add ability to remove patches

Change-Id: Ia777213f4e1a5c3f7b3b583b932dfea7590076f1
diff --git a/apps/patchpanel/src/main/java/org/onosproject/patchpanel/cli/PatchListCommand.java b/apps/patchpanel/src/main/java/org/onosproject/patchpanel/cli/PatchListCommand.java
new file mode 100644
index 0000000..9d8f088
--- /dev/null
+++ b/apps/patchpanel/src/main/java/org/onosproject/patchpanel/cli/PatchListCommand.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * This class defines the cli command for the PatchPanel class. It creates
+ * an instance of the PatchPanelService class to call it's method addPatch().
+ * The command takes 2 parameters, 2 connectPoints.
+ */
+package org.onosproject.patchpanel.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.patchpanel.impl.Patch;
+import org.onosproject.patchpanel.impl.PatchPanelService;
+
+/**
+ * Lists the patches.
+ */
+@Command(scope = "onos", name = "patches",
+         description = "Lists the patches")
+public class PatchListCommand extends AbstractShellCommand {
+
+    private static final String FORMAT = "%s: %s <-> %s";
+
+    @Override
+    protected void execute() {
+        PatchPanelService patchPanelService = get(PatchPanelService.class);
+
+        patchPanelService.getPatches().forEach(this::print);
+    }
+
+    private void print(Patch patch) {
+        print(FORMAT, patch.id(), patch.port1(), patch.port2());
+    }
+
+}