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
9 package org.opendaylight.vpnservice.neutronvpn.shell;
11 import org.apache.karaf.shell.commands.Command;
12 import org.apache.karaf.shell.commands.Option;
13 import org.apache.karaf.shell.console.OsgiCommandSupport;
14 import org.opendaylight.vpnservice.neutronvpn.interfaces.INeutronVpnManager;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
17 @Command(scope = "vpnservice", name = "l3vpn-config-show", description = "Displays Neutron L3VPN configuration")
18 public class ShowVpnConfigCommand extends OsgiCommandSupport {
20 @Option(name = "-vid", aliases = {"--vpnid"}, description = "VPN ID", required = false, multiValued = false)
23 private INeutronVpnManager neutronVpnManager;
25 public void setNeutronVpnManager(INeutronVpnManager neutronVpnManager) {
26 this.neutronVpnManager = neutronVpnManager;
30 protected Object doExecute() throws Exception {
34 vuuid = new Uuid(vid);
37 for (String p : neutronVpnManager.showVpnConfigCLI(vuuid)) {
38 System.out.println(p);