Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [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 | package org.onosproject.drivers.microsemi.yang; |
| 17 | |
| 18 | import java.time.OffsetDateTime; |
| 19 | |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 20 | import org.onosproject.netconf.DatastoreId; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 21 | import org.onosproject.netconf.NetconfException; |
| 22 | import org.onosproject.netconf.NetconfSession; |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 23 | import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem; |
| 24 | import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystemOpParam; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * Extension of ietfSystemService to include NETCONF sessions. |
| 28 | * |
| 29 | * This is manually extended and should be revised if the ietf-system.yang file changes |
| 30 | */ |
| 31 | public interface IetfSystemNetconfService { |
| 32 | /** |
| 33 | * Returns the attribute ietfSystem. |
| 34 | * |
| 35 | * @param ietfSystem value of ietfSystem |
| 36 | * @param session An active NETCONF session |
| 37 | * @return ietfSystem |
| 38 | * @throws NetconfException if the session has any error |
| 39 | */ |
| 40 | IetfSystem getIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session) throws NetconfException; |
| 41 | |
| 42 | /** |
| 43 | * Returns the result of the init query. |
| 44 | * |
| 45 | * @param session An active NETCONF session |
| 46 | * @return ietfSystem |
| 47 | * @throws NetconfException if the session has any error |
| 48 | */ |
| 49 | IetfSystem getIetfSystemInit(NetconfSession session) throws NetconfException; |
| 50 | |
| 51 | /** |
| 52 | * Sets the value to attribute ietfSystem. |
| 53 | * |
| 54 | * @param ietfSystem value of ietfSystem |
| 55 | * @param session An active NETCONF session |
| 56 | * @param ncDs datastore type running, startup or candidate |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 57 | * @return Boolean to indicate success or failure |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 58 | * @throws NetconfException if the session has any error |
| 59 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 60 | boolean setIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session, |
| 61 | DatastoreId ncDs) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 62 | |
| 63 | /** |
| 64 | * Service interface of setCurrentDatetime. |
| 65 | * |
| 66 | * @param date input of service interface setCurrentDatetime |
| 67 | * @param session An active NETCONF session |
| 68 | * @throws NetconfException if the session has any error |
| 69 | */ |
| 70 | void setCurrentDatetime(OffsetDateTime date, NetconfSession session) throws NetconfException; |
| 71 | |
| 72 | /** |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 73 | * Service interface of systemShutdown. |
| 74 | * |
| 75 | * @param session An active NETCONF session |
| 76 | * @throws NetconfException if the session has any error |
| 77 | */ |
| 78 | void systemShutdown(NetconfSession session) throws NetconfException; |
| 79 | |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 80 | } |