2 * Copyright (C) 2013 Red Hat, Inc.
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 * Authors : Madhu Venugopal
10 package org.opendaylight.ovsdb.plugin.shell;
12 import java.util.Collection;
13 import java.util.concurrent.ConcurrentMap;
15 import org.apache.felix.gogo.commands.Argument;
16 import org.apache.felix.gogo.commands.Command;
17 import org.apache.karaf.shell.console.OsgiCommandSupport;
18 import org.opendaylight.controller.sal.core.Node;
19 import org.opendaylight.ovsdb.lib.notation.Column;
20 import org.opendaylight.ovsdb.lib.notation.Row;
21 import org.opendaylight.ovsdb.plugin.api.OvsdbInventoryService;
23 @Command(scope = "ovs", name = "printCache", description="Prints OVSDB Cache")
24 public class PrintCache extends OsgiCommandSupport{
25 private OvsdbInventoryService ovsdbInventory;
27 @Argument(index=0, name="nodeName", description="Node Name", required=true, multiValued=false)
28 String nodeName = null;
31 protected Object doExecute() throws Exception {
32 Node node = Node.fromString(nodeName);
33 ovsdbInventory.printCache(node);
37 public void setOvsdbInventory(OvsdbInventoryService inventoryService){
38 this.ovsdbInventory = inventoryService;