blob: 1bc32ca7ac30dfc20cdbabdb899c8fb63caac04a [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-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
Sean Condon0e89bda2017-03-21 14:23:19 +000018import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdShort;
19import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MdId;
20import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MepId;
21import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
Sean Condon06613e92017-06-09 15:14:01 +010022import org.onosproject.netconf.DatastoreId;
Sean Condonfae8e662016-12-15 10:25:13 +000023import org.onosproject.netconf.NetconfException;
24import org.onosproject.netconf.NetconfSession;
Sean Condon06613e92017-06-09 15:14:01 +010025import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm;
26import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfmOpParam;
27import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.abortloopback.AbortLoopbackInput;
28import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput;
29import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput;
30import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitloopback.TransmitLoopbackInput;
Sean Condonfae8e662016-12-15 10:25:13 +000031
32/**
33 * Extension of mseaCfmService to include NETCONF sessions.
34 *
35 * This is manually extended and should be revised if the msea-cfm.yang,
36 * msea-soam-pm.yang or msea-soam-fm.yang files change
37 */
Sean Condon06613e92017-06-09 15:14:01 +010038public interface MseaCfmNetconfService {
Sean Condonfae8e662016-12-15 10:25:13 +000039
40 /**
Sean Condon0e89bda2017-03-21 14:23:19 +000041 * Returns minimal set of attributes of MEP.
Sean Condonfae8e662016-12-15 10:25:13 +000042 *
Sean Condon0e89bda2017-03-21 14:23:19 +000043 * @param mdId The name of the MD
44 * @param maId The name of the MA
Sean Condonfae8e662016-12-15 10:25:13 +000045 * @param mepId The ID of the MEP
46 * @param session An active NETCONF session
47 * @return mseaCfm
48 * @throws NetconfException if the session has any error
49 */
Sean Condon0e89bda2017-03-21 14:23:19 +000050 MseaCfm getMepEssentials(MdId mdId, MaIdShort maId, MepId mepId,
51 NetconfSession session) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000052
Sean Condon0e89bda2017-03-21 14:23:19 +000053 /**
54 * Returns full set of attributes of MEP.
55 * This returns config and state attributes of all children of the MEP
56 * except for Delay Measurements and Loss Measurements - these have to be
57 * retrieved separately, because of their potential size
58 * @param mdId The name of the MD
59 * @param maId The name of the MA
60 * @param mepId The ID of the MEP
61 * @param session An active NETCONF session
62 * @return mseaCfm
63 * @throws NetconfException if the session has any error
64 */
65 MseaCfm getMepFull(MdId mdId, MaIdShort maId, MepId mepId,
66 NetconfSession session) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000067
68 /**
69 * Returns attributes of DM.
70 *
Sean Condon0e89bda2017-03-21 14:23:19 +000071 * @param mdId The name of the MD
72 * @param maId The name of the MA
Sean Condonfae8e662016-12-15 10:25:13 +000073 * @param mepId The ID of the MEP
Sean Condon0e89bda2017-03-21 14:23:19 +000074 * @param dmId The Id of the Delay Measurement - if null then all DMs
75 * @param parts The parts of the DM to return
Sean Condonfae8e662016-12-15 10:25:13 +000076 * @param session An active NETCONF session
77 * @return mseaCfm
78 * @throws NetconfException if the session has any error
79 */
Sean Condon0e89bda2017-03-21 14:23:19 +000080 MseaCfm getSoamDm(MdId mdId, MaIdShort maId, MepId mepId,
81 SoamId dmId, DmEntryParts parts, NetconfSession session)
82 throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000083
84 /**
85 * Sets the value to attribute mseaCfm.
86 *
87 * @param mseaCfm value of mseaCfm
88 * @param session An active NETCONF session
89 * @param targetDs one of running, candidate or startup
Sean Condon06613e92017-06-09 15:14:01 +010090 * @return Boolean to indicate success or failure
Sean Condonfae8e662016-12-15 10:25:13 +000091 * @throws NetconfException if the session has any error
92 */
Sean Condon06613e92017-06-09 15:14:01 +010093 boolean setMseaCfm(MseaCfmOpParam mseaCfm, NetconfSession session,
94 DatastoreId targetDs) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000095
96 /**
Sean Condon0e89bda2017-03-21 14:23:19 +000097 * Deletes named Meps of mseaCfm.
98 * Expects to see a list of Meps
99 *
100 * @param mseaCfm value of mseaCfm
101 * @param session An active NETCONF session
102 * @param targetDs one of running, candidate or startup
103 * @return Boolean to indicate success or failure
104 * @throws NetconfException if the session has any error
105 */
106 boolean deleteMseaMep(MseaCfmOpParam mseaCfm, NetconfSession session,
107 DatastoreId targetDs) throws NetconfException;
108
109
110 /**
111 * Deletes named delay measurements of mseaCfm.
112 * Expects to see a list of Delay Measurements
113 *
114 * @param mseaCfm value of mseaCfm
115 * @param session An active NETCONF session
116 * @param targetDs one of running, candidate or startup
117 * @return Boolean to indicate success or failure
118 * @throws NetconfException if the session has any error
119 */
120 boolean deleteMseaCfmDm(MseaCfmOpParam mseaCfm, NetconfSession session,
121 DatastoreId targetDs) throws NetconfException;
122
123 /**
Sean Condonfae8e662016-12-15 10:25:13 +0000124 * Service interface of transmitLoopback.
125 *
126 * @param inputVar input of service interface transmitLoopback
127 * @param session An active NETCONF session
128 * @throws NetconfException if the session has any error
129 */
Sean Condon06613e92017-06-09 15:14:01 +0100130 void transmitLoopback(TransmitLoopbackInput inputVar,
131 NetconfSession session) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +0000132
133 /**
134 * Service interface of abortLoopback.
135 *
136 * @param inputVar input of service interface abortLoopback
137 * @param session An active NETCONF session
138 * @throws NetconfException if the session has any error
139 */
Sean Condon06613e92017-06-09 15:14:01 +0100140 void abortLoopback(AbortLoopbackInput inputVar,
141 NetconfSession session) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +0000142
143 /**
144 * Service interface of transmitLinktrace.
145 *
146 * @param inputVar input of service interface transmitLinktrace
147 * @param session An active NETCONF session
148 * @return transmitLinktraceOutput output of service interface transmitLinktrace
149 * @throws NetconfException if the session has any error
150 */
Sean Condon06613e92017-06-09 15:14:01 +0100151 TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar,
152 NetconfSession session) throws NetconfException;
Sean Condon0e89bda2017-03-21 14:23:19 +0000153
154 public enum DmEntryParts {
155 ALL_PARTS,
156 CURRENT_ONLY,
157 HISTORY_ONLY;
158 }
Sean Condonfae8e662016-12-15 10:25:13 +0000159}