blob: d72050e7465c5f158cc0ffa98c93918564e0aa6a [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Sean Condonfae8e662016-12-15 10:25:13 +00003 *
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.ietfsystem.rev20140806.IetfSystem;
24import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystemOpParam;
Sean Condonfae8e662016-12-15 10:25:13 +000025
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 */
31public 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 Condon06613e92017-06-09 15:14:01 +010057 * @return Boolean to indicate success or failure
Sean Condonfae8e662016-12-15 10:25:13 +000058 * @throws NetconfException if the session has any error
59 */
Sean Condon06613e92017-06-09 15:14:01 +010060 boolean setIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session,
61 DatastoreId ncDs) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000062
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 Condonfae8e662016-12-15 10:25:13 +000073 * 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 Condonfae8e662016-12-15 10:25:13 +000080}