added feature topology manager shell
[controller.git] / opendaylight / topologymanager / shell / src / main / java / org / opendaylight / controller / topologymanager / shell / DeleteUserLink.java
diff --git a/opendaylight/topologymanager/shell/src/main/java/org/opendaylight/controller/topologymanager/shell/DeleteUserLink.java b/opendaylight/topologymanager/shell/src/main/java/org/opendaylight/controller/topologymanager/shell/DeleteUserLink.java
new file mode 100644 (file)
index 0000000..b226c3c
--- /dev/null
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*/
+package org.opendaylight.controller.topologymanager.shell;
+
+import org.apache.felix.gogo.commands.Command;
+import org.apache.felix.gogo.commands.Argument;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.controller.topologymanager.ITopologyManagerShell;
+
+@Command(scope = "topologymanager", name = "deleteUserLink", description="deletes user link")
+public class DeleteUserLink extends OsgiCommandSupport{
+    private ITopologyManagerShell topologyManager;
+
+    @Argument(index=0, name="name", description="name", required=true, multiValued=false)
+    String name = null;
+
+    @Override
+    protected Object doExecute() throws Exception {
+        for(String p : topologyManager.deleteUserLinkShell(name)) {
+            System.out.println(p);
+        }
+        return null;
+    }
+
+    public void setTopologyManager(ITopologyManagerShell topologyManager){
+        this.topologyManager = topologyManager;
+    }
+}