andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 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 | |
| 17 | package org.onosproject.netconf; |
| 18 | |
| 19 | /** |
| 20 | * Interface representing a NETCONF device. |
| 21 | */ |
| 22 | public 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 | } |