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 org.apache.karaf.shell.commands.Argument;
11 import org.apache.karaf.shell.commands.Command;
12 import org.apache.karaf.shell.console.OsgiCommandSupport;
13 import org.opendaylight.elanmanager.api.IElanService;
14 import org.slf4j.Logger;
15 import org.slf4j.LoggerFactory;
17 @Command(scope = "staticMac", name = "delete", description = "deleting Static Mac Address")
18 public class StaticMacDelete extends OsgiCommandSupport {
20 @Argument(index = 0, name = "elanName", description = "ELAN-NAME", required = true, multiValued = false)
21 private String elanName;
22 @Argument(index = 1, name = "interfaceName", description = "InterfaceName", required = true, multiValued = false)
23 private String interfaceName;
24 @Argument(index = 2, name = "staticMacAddress", description = "StaticMacAddress", required = true, multiValued = false)
25 private String staticMacAddress;
26 private static final Logger logger = LoggerFactory.getLogger(StaticMacDelete.class);
27 private IElanService elanProvider;
29 public void setElanProvider(IElanService elanServiceProvider) {
30 this.elanProvider = elanServiceProvider;
34 protected Object doExecute() {
36 logger.debug("Executing create ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t" + staticMacAddress + "\t");
37 elanProvider.deleteStaticMacAddress(elanName, interfaceName, staticMacAddress);
38 } catch (Exception e) {