blob: 1974782b7a4b1913a8cd5e6f27668195df05edc0 [file] [log] [blame]
andreaeb70a942015-10-16 21:34:46 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.netconf;
18
19/**
20 * Interface representing a NETCONF device.
21 */
22public interface NetconfDevice {
23
24
25 /**
26 * Returns whether a device is a NETCONF device with a capabilities list
27 * and is accessible.
28 *
29 * @return true if device is accessible, false otherwise
30 */
31 boolean isActive();
32
33 /**
34 * Returns a NETCONF session context for this device.
35 *
36 * @return netconf session
37 */
38 NetconfSession getSession();
39
40 /**
41 * Ensures that all sessions are closed.
42 * A device cannot be used after disconnect is called.
43 */
44 void disconnect();
45
46 /**
47 * return all the info associated with this device.
48 * @return NetconfDeviceInfo
49 */
50 NetconfDeviceInfo getDeviceInfo();
51}