Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present 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 | package org.onosproject.drivers.microsemi.yang; |
| 17 | |
| 18 | import java.time.OffsetDateTime; |
| 19 | |
| 20 | import org.onosproject.netconf.NetconfException; |
| 21 | import org.onosproject.netconf.NetconfSession; |
| 22 | import org.onosproject.netconf.TargetConfig; |
| 23 | import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootInput; |
| 24 | import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootOutput; |
| 25 | import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.pullupdatetarfromtftp.PullUpdateTarFromTftpInput; |
| 26 | import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogInput; |
| 27 | import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogOutput; |
| 28 | import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.IetfSystem; |
| 29 | import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.IetfSystemOpParam; |
| 30 | import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.ietfsystem.systemrestart.SystemRestartInput; |
| 31 | |
| 32 | /** |
| 33 | * Extension of ietfSystemService to include NETCONF sessions. |
| 34 | * |
| 35 | * This is manually extended and should be revised if the ietf-system.yang file changes |
| 36 | */ |
| 37 | public interface IetfSystemNetconfService { |
| 38 | /** |
| 39 | * Returns the attribute ietfSystem. |
| 40 | * |
| 41 | * @param ietfSystem value of ietfSystem |
| 42 | * @param session An active NETCONF session |
| 43 | * @return ietfSystem |
| 44 | * @throws NetconfException if the session has any error |
| 45 | */ |
| 46 | IetfSystem getIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session) throws NetconfException; |
| 47 | |
| 48 | /** |
| 49 | * Returns the result of the init query. |
| 50 | * |
| 51 | * @param session An active NETCONF session |
| 52 | * @return ietfSystem |
| 53 | * @throws NetconfException if the session has any error |
| 54 | */ |
| 55 | IetfSystem getIetfSystemInit(NetconfSession session) throws NetconfException; |
| 56 | |
| 57 | /** |
| 58 | * Sets the value to attribute ietfSystem. |
| 59 | * |
| 60 | * @param ietfSystem value of ietfSystem |
| 61 | * @param session An active NETCONF session |
| 62 | * @param ncDs datastore type running, startup or candidate |
| 63 | * @throws NetconfException if the session has any error |
| 64 | */ |
| 65 | void setIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session, TargetConfig ncDs) |
| 66 | throws NetconfException; |
| 67 | |
| 68 | /** |
| 69 | * Service interface of setCurrentDatetime. |
| 70 | * |
| 71 | * @param date input of service interface setCurrentDatetime |
| 72 | * @param session An active NETCONF session |
| 73 | * @throws NetconfException if the session has any error |
| 74 | */ |
| 75 | void setCurrentDatetime(OffsetDateTime date, NetconfSession session) throws NetconfException; |
| 76 | |
| 77 | /** |
| 78 | * Service interface of systemRestart. |
| 79 | * |
| 80 | * @param inputVar input of service interface systemRestart |
| 81 | * @param session An active NETCONF session |
| 82 | * @throws NetconfException if the session has any error |
| 83 | */ |
| 84 | void systemRestart(SystemRestartInput inputVar, NetconfSession session) throws NetconfException; |
| 85 | |
| 86 | /** |
| 87 | * Service interface of systemShutdown. |
| 88 | * |
| 89 | * @param session An active NETCONF session |
| 90 | * @throws NetconfException if the session has any error |
| 91 | */ |
| 92 | void systemShutdown(NetconfSession session) throws NetconfException; |
| 93 | |
| 94 | /** |
| 95 | * Service interface of doUpgradeAndReboot. |
| 96 | * |
| 97 | * @param inputVar input of service interface doUpgradeAndReboot |
| 98 | * @param session An active NETCONF session |
| 99 | * @return doUpgradeAndRebootOutput output of service interface doUpgradeAndReboot |
| 100 | * @throws NetconfException if the session has any error |
| 101 | */ |
| 102 | DoUpgradeAndRebootOutput doUpgradeAndReboot(DoUpgradeAndRebootInput inputVar, NetconfSession session) |
| 103 | throws NetconfException; |
| 104 | |
| 105 | /** |
| 106 | * Service interface of pullUpdateTarFromTftp. |
| 107 | * |
| 108 | * @param inputVar input of service interface pullUpdateTarFromTftp |
| 109 | * @param session An active NETCONF session |
| 110 | * @throws NetconfException if the session has any error |
| 111 | */ |
| 112 | void pullUpdateTarFromTftp(PullUpdateTarFromTftpInput inputVar, NetconfSession session) |
| 113 | throws NetconfException; |
| 114 | |
| 115 | /** |
| 116 | * Service interface of readFromSyslog. |
| 117 | * |
| 118 | * @param inputVar input of service interface readFromSyslog |
| 119 | * @param session An active NETCONF session |
| 120 | * @return readFromSyslogOutput output of service interface readFromSyslog |
| 121 | * @throws NetconfException if the session has any error |
| 122 | */ |
| 123 | ReadFromSyslogOutput readFromSyslog(ReadFromSyslogInput inputVar, NetconfSession session) |
| 124 | throws NetconfException; |
| 125 | |
| 126 | } |