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
8 package org.opendaylight.netconf.console.api;
10 import java.util.List;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev231121.NetconfNode;
14 public interface NetconfCommands {
16 * Returns a Hashmap with NETCONF ID as outer key and
17 * inner keys representing attributes of a NETCONF device.
18 * @return :Hashmap with two keys for all NETCONF devices in topology
20 Map<String, Map<String, String>> listDevices();
23 * Returns a Hashmap with NETCONF ID as outer key and inner keys representing
24 * attributes of a NETCONF device for the requested IP and Port. If port is not
25 * specified, all NETCONF devices with requested IP address are returned.
26 * @param deviceIp :IP address of NETCONF device
27 * @param devicePort :Port of the NETCONF device
28 * @return :Hashmap with two keys for the requested device IP and/or Port
30 Map<String, Map<String, List<String>>> showDevice(String deviceIp, String devicePort);
33 * Returns a Hashmap with NETCONF ID as outer key and inner keys representing
34 * attributes of a NETCONF device for the requested netconf device ID.
35 * @param deviceId :Node id of NETCONF device
36 * @return :Hashmap with two keys for the requested device Id
38 Map<String, Map<String, List<String>>> showDevice(String deviceId);
41 * Add a NETCONF connector.
42 * @param netconfNode :An instance of {@link NetconfNode} containing
43 * all required information
44 * @param deviceId :NETCONF node ID
46 void connectDevice(NetconfNode netconfNode, String deviceId);
49 * Disconnect a NETCONF connector.
50 * @param deviceIp :IP address of NETCONF device
51 * @param devicePort :Port of NETCONF device
52 * @return :Status of disconnect NETCONF connector
54 boolean disconnectDevice(String deviceIp, String devicePort);
57 * Disconnect a NETCONF connector.
58 * @param deviceId :Node id of NETCONF device
59 * @return :Status of disconnect NETCONF connector
61 boolean disconnectDevice(String deviceId);
64 * Update the NETCONF device for requested values.
65 * @param deviceId :NETCONF node ID
66 * @param username :Username for NETCONF device
67 * @param password :Password for NETCONF device
68 * @param updated :HashMap of attributes to update
69 * @return :Status of update NETCONF connector
71 String updateDevice(String deviceId, String username, String password, Map<String, String> updated);