blob: 44c62f6ab6ba9a6878cd1526a05c8ef1346f4c3c [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001/*
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 */
16package org.onosproject.drivers.microsemi.yang;
17
18import java.time.OffsetDateTime;
19
Sean Condon06613e92017-06-09 15:14:01 +010020import org.onosproject.netconf.DatastoreId;
Sean Condonfae8e662016-12-15 10:25:13 +000021import org.onosproject.netconf.NetconfException;
22import org.onosproject.netconf.NetconfSession;
Sean Condon06613e92017-06-09 15:14:01 +010023import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootInput;
24import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootOutput;
25import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.pullupdatetarfromtftp.PullUpdateTarFromTftpInput;
26import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogInput;
27import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogOutput;
28import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem;
29import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystemOpParam;
30import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.ietfsystem.systemrestart.SystemRestartInput;
Sean Condonfae8e662016-12-15 10:25:13 +000031
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 */
37public 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
Sean Condon06613e92017-06-09 15:14:01 +010063 * @return Boolean to indicate success or failure
Sean Condonfae8e662016-12-15 10:25:13 +000064 * @throws NetconfException if the session has any error
65 */
Sean Condon06613e92017-06-09 15:14:01 +010066 boolean setIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session,
67 DatastoreId ncDs) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000068
69 /**
70 * Service interface of setCurrentDatetime.
71 *
72 * @param date input of service interface setCurrentDatetime
73 * @param session An active NETCONF session
74 * @throws NetconfException if the session has any error
75 */
76 void setCurrentDatetime(OffsetDateTime date, NetconfSession session) throws NetconfException;
77
78 /**
79 * Service interface of systemRestart.
80 *
81 * @param inputVar input of service interface systemRestart
82 * @param session An active NETCONF session
83 * @throws NetconfException if the session has any error
84 */
85 void systemRestart(SystemRestartInput inputVar, NetconfSession session) throws NetconfException;
86
87 /**
88 * Service interface of systemShutdown.
89 *
90 * @param session An active NETCONF session
91 * @throws NetconfException if the session has any error
92 */
93 void systemShutdown(NetconfSession session) throws NetconfException;
94
95 /**
96 * Service interface of doUpgradeAndReboot.
97 *
98 * @param inputVar input of service interface doUpgradeAndReboot
99 * @param session An active NETCONF session
100 * @return doUpgradeAndRebootOutput output of service interface doUpgradeAndReboot
101 * @throws NetconfException if the session has any error
102 */
103 DoUpgradeAndRebootOutput doUpgradeAndReboot(DoUpgradeAndRebootInput inputVar, NetconfSession session)
104 throws NetconfException;
105
106 /**
107 * Service interface of pullUpdateTarFromTftp.
108 *
109 * @param inputVar input of service interface pullUpdateTarFromTftp
110 * @param session An active NETCONF session
111 * @throws NetconfException if the session has any error
112 */
113 void pullUpdateTarFromTftp(PullUpdateTarFromTftpInput inputVar, NetconfSession session)
114 throws NetconfException;
115
116 /**
117 * Service interface of readFromSyslog.
118 *
119 * @param inputVar input of service interface readFromSyslog
120 * @param session An active NETCONF session
121 * @return readFromSyslogOutput output of service interface readFromSyslog
122 * @throws NetconfException if the session has any error
123 */
124 ReadFromSyslogOutput readFromSyslog(ReadFromSyslogInput inputVar, NetconfSession session)
125 throws NetconfException;
126
127}