2 * Copyright (c) 2014 Cisco Systems, Inc. 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.openflowplugin.droptestkaraf;
10 import java.util.List;
11 import org.apache.karaf.shell.api.action.lifecycle.Service;
12 import org.apache.karaf.shell.api.console.CommandLine;
13 import org.apache.karaf.shell.api.console.Completer;
14 import org.apache.karaf.shell.api.console.Session;
15 import org.apache.karaf.shell.support.completers.StringsCompleter;
18 * General dropAllPackets on/off argument completer.
21 public class DropAllPacketsCompleter implements Completer {
24 public int complete(final Session session, final CommandLine commandLine, final List<String> candidates) {
25 final var delegate = new StringsCompleter();
26 delegate.getStrings().add("on");
27 delegate.getStrings().add("off");
28 return delegate.complete(session, commandLine, candidates);