ELAN: skip remote unicast MACs
[netvirt.git] / neutronvpn / shell / src / main / java / org / opendaylight / netvirt / neutronvpn / shell / ShowNeutronPortsCommand.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netvirt.neutronvpn.shell;
10
11 import org.apache.karaf.shell.commands.Command;
12 import org.apache.karaf.shell.console.OsgiCommandSupport;
13 import org.opendaylight.netvirt.neutronvpn.interfaces.INeutronVpnManager;
14
15 @Command(scope = "vpnservice", name = "neutron-ports-show", description = "Displays neutron ports")
16 public class ShowNeutronPortsCommand extends OsgiCommandSupport {
17
18     private final INeutronVpnManager neutronVpnManager;
19
20     public ShowNeutronPortsCommand(INeutronVpnManager neutronVpnManager) {
21         this.neutronVpnManager = neutronVpnManager;
22     }
23
24     @Override
25     protected Object doExecute() throws Exception {
26         for (String p : neutronVpnManager.showNeutronPortsCLI()) {
27             session.getConsole().println(p);
28         }
29         return null;
30     }
31 }