1
2
3
4
5
6
7
8
9 package org.opendaylight.lispflowmapping.shell;
10
11 import org.apache.karaf.shell.commands.Command;
12 import org.apache.karaf.shell.console.OsgiCommandSupport;
13 import org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingServiceShell;
14
15
16
17
18
19
20
21 @Command(scope = "mappingservice", name = "addkey", description="Add an authentication key")
22 public class LispAddKey extends OsgiCommandSupport {
23 private IMappingServiceShell mappingServiceShell;
24
25 @Override
26 protected Object doExecute() throws Exception {
27 mappingServiceShell.addDefaultKeyIPv4();
28 return null;
29 }
30
31 public void setMappingServiceShell(IMappingServiceShell mappingServiceShell) {
32 this.mappingServiceShell = mappingServiceShell;
33 }
34 }