2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.vpnservice.elan.cli;
10 import java.math.BigInteger;
11 import java.util.List;
13 import org.apache.karaf.shell.console.OsgiCommandSupport;
14 import org.apache.karaf.shell.commands.Argument;
15 import org.apache.karaf.shell.commands.Command;
16 import org.apache.karaf.shell.commands.Option;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
21 import com.google.common.util.concurrent.Futures;
22 import org.opendaylight.elanmanager.api.IElanService;
24 @Command(scope = "elanInterface", name = "delete", description = "deleting Elan Interface")
25 public class ElanInterfaceDelete extends OsgiCommandSupport {
27 @Argument(index = 0, name = "elanName", description = "ELAN-NAME", required = true, multiValued = false)
28 private String elanName;
29 @Argument(index = 1, name = "interfaceName", description = "InterfaceName", required = true, multiValued = false)
30 private String interfaceName;
31 private static final Logger logger = LoggerFactory.getLogger(ElanInterfaceDelete.class);
32 private IElanService elanProvider;
34 public void setElanProvider(IElanService elanServiceProvider) {
35 this.elanProvider = elanServiceProvider;
39 protected Object doExecute() {
41 logger.debug("Deleting ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t");
42 elanProvider.deleteElanInterface(elanName, interfaceName);
43 } catch (Exception e) {