2 * Copyright (c) 2016 Inocybe Technologies 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.netconf.console.api;
11 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
15 public interface NetconfCommands {
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
22 Map<String, Map<String, String>> listDevices();
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
32 Map<String, Map<String, List<String>>> showDevice(String deviceIp, String devicePort);
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
40 Map<String, Map<String, List<String>>> showDevice(String deviceId);
43 * Add a NETCONF connector.
44 * @param netconfNode :An instance of {@link NetconfNode} containing
45 * all required information
46 * @param deviceId :NETCONF node ID
48 void connectDevice(NetconfNode netconfNode, String deviceId);
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
56 boolean disconnectDevice(String deviceIp, String devicePort);
59 * Disconnect a NETCONF connector.
60 * @param deviceId :Node id of NETCONF device
61 * @return :Status of disconnect NETCONF connector
63 boolean disconnectDevice(String deviceId);
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
73 String updateDevice(String deviceId, String username, String password, Map<String, String> updated);