2 * Copyright (c) 2013 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
9 package org.opendaylight.openflowplugin.droptestkaraf;
11 import org.opendaylight.openflowplugin.testcommon.DropTestDsProvider;
13 import java.io.PrintStream;
14 import org.apache.karaf.shell.commands.Command;
15 import org.apache.karaf.shell.console.OsgiCommandSupport;
16 import org.opendaylight.openflowplugin.testcommon.DropTestRpcProvider;
18 @Command(scope = "drop-test", name = "clearDropStats", description = "Clear drop statistics.")
19 public class ClearDropStatsCommandProvider extends OsgiCommandSupport {
22 protected Object doExecute() throws Exception {
23 PrintStream out = session.getConsole();
24 final DropTestRpcProvider rpcProvider = DropTestActivator.getDropRpcProvider();
25 final DropTestDsProvider provider = DropTestActivator.getDropDsProvider();
27 out.println("Clearing drop statistics... ");
28 rpcProvider.clearStats();
29 provider.clearStats();