Move shaded components to third-party/
[netconf.git] / netconf / netconf-console / src / main / java / org / opendaylight / netconf / console / api / NetconfCommands.java
1 /*
2  * Copyright (c) 2016 Inocybe Technologies and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netconf.console.api;
10
11 import java.util.List;
12 import java.util.Map;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNode;
14
15 public interface NetconfCommands {
16
17     /**
18      * Returns a Hashmap with NETCONF ID as outer key and
19      * inner keys representing attributes of a NETCONF device.
20      * @return :Hashmap with two keys for all NETCONF devices in topology
21      */
22     Map<String, Map<String, String>> listDevices();
23
24     /**
25      * Returns a Hashmap with NETCONF ID as outer key and inner keys representing
26      * attributes of a NETCONF device for the requested IP and Port. If port is not
27      * specified, all NETCONF devices with requested IP address are returned.
28      * @param deviceIp :IP address of NETCONF device
29      * @param devicePort :Port of the NETCONF device
30      * @return :Hashmap with two keys for the requested device IP and/or Port
31      */
32     Map<String, Map<String, List<String>>> showDevice(String deviceIp, String devicePort);
33
34     /**
35      * Returns a Hashmap with NETCONF ID as outer key and inner keys representing
36      * attributes of a NETCONF device for the requested netconf device ID.
37      * @param deviceId :Node id of NETCONF device
38      * @return :Hashmap with two keys for the requested device Id
39      */
40     Map<String, Map<String, List<String>>> showDevice(String deviceId);
41
42     /**
43      * Add a NETCONF connector.
44      * @param netconfNode :An instance of {@link NetconfNode} containing
45      *     all required information
46      * @param deviceId :NETCONF node ID
47      */
48     void connectDevice(NetconfNode netconfNode, String deviceId);
49
50     /**
51      * Disconnect a NETCONF connector.
52      * @param deviceIp :IP address of NETCONF device
53      * @param devicePort :Port of NETCONF device
54      * @return :Status of disconnect NETCONF connector
55      */
56     boolean disconnectDevice(String deviceIp, String devicePort);
57
58     /**
59      * Disconnect a NETCONF connector.
60      * @param deviceId :Node id of NETCONF device
61      * @return :Status of disconnect NETCONF connector
62      */
63     boolean disconnectDevice(String deviceId);
64
65     /**
66      * Update the NETCONF device for requested values.
67      * @param deviceId :NETCONF node ID
68      * @param username :Username for NETCONF device
69      * @param password :Password for NETCONF device
70      * @param updated :HashMap of attributes to update
71      * @return :Status of update NETCONF connector
72      */
73     String updateDevice(String deviceId, String username, String password, Map<String, String> updated);
74 }