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.controller.netconf.cli.commands.local;
10 import org.opendaylight.controller.netconf.cli.commands.AbstractCommand;
11 import org.opendaylight.controller.netconf.cli.commands.Command;
12 import org.opendaylight.controller.netconf.cli.commands.CommandInvocationException;
13 import org.opendaylight.controller.netconf.cli.commands.input.Input;
14 import org.opendaylight.controller.netconf.cli.commands.input.InputDefinition;
15 import org.opendaylight.controller.netconf.cli.commands.output.Output;
16 import org.opendaylight.controller.netconf.cli.commands.output.OutputDefinition;
17 import org.opendaylight.yangtools.yang.common.QName;
18 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
21 * Local command to shut down the cli
23 public class Close extends AbstractCommand {
25 public Close(final QName qName, final InputDefinition args, final OutputDefinition output, final String description) {
26 super(qName, args, output, description);
30 public Output invoke(final Input inputArgs) throws CommandInvocationException {
31 // FIXME clean up, close session and then close
36 public static Command create(final RpcDefinition rpcDefinition) {
37 return new Close(rpcDefinition.getQName(), getInputDefinition(rpcDefinition),
38 getOutputDefinition(rpcDefinition), rpcDefinition.getDescription());