2 * Copyright (c) 2016 Cisco Systems, Inc. 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.lispflowmapping.shell;
11 import org.apache.karaf.shell.commands.Command;
12 import org.apache.karaf.shell.console.OsgiCommandSupport;
13 import org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingServiceShell;
16 * This class implements the "mappingservice:keys" Karaf shell command.
18 * @author Lorand Jakab
21 @Command(scope = "mappingservice", name = "keys", description = "Print LISP authentication keys")
22 public class LispKeys extends OsgiCommandSupport {
23 private IMappingServiceShell mappingServiceShell;
26 * TODO Eventually it would be best to merge the addkey command into this one, using optional arguments.
30 @SuppressWarnings("checkstyle:RegexpSinglelineJava")
31 protected Object doExecute() throws Exception {
32 System.out.print(mappingServiceShell.printKeys());
36 public void setMappingServiceShell(IMappingServiceShell mappingServiceShell) {
37 this.mappingServiceShell = mappingServiceShell;