Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-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 | |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 18 | import org.onosproject.netconf.DatastoreId; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 19 | import org.onosproject.netconf.NetconfException; |
| 20 | import org.onosproject.netconf.NetconfSession; |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 21 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm; |
| 22 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfmOpParam; |
| 23 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.abortloopback.AbortLoopbackInput; |
| 24 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput; |
| 25 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput; |
| 26 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitloopback.TransmitLoopbackInput; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Extension of mseaCfmService to include NETCONF sessions. |
| 30 | * |
| 31 | * This is manually extended and should be revised if the msea-cfm.yang, |
| 32 | * msea-soam-pm.yang or msea-soam-fm.yang files change |
| 33 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 34 | public interface MseaCfmNetconfService { |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * Returns attributes of MEP. |
| 38 | * |
| 39 | * @param mdName The name of the MD |
| 40 | * @param maName The name of the MA |
| 41 | * @param mepId The ID of the MEP |
| 42 | * @param session An active NETCONF session |
| 43 | * @return mseaCfm |
| 44 | * @throws NetconfException if the session has any error |
| 45 | */ |
| 46 | MseaCfm getMepEssentials(String mdName, String maName, int mepId, |
| 47 | NetconfSession session) throws NetconfException; |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * Returns attributes of DM. |
| 52 | * |
| 53 | * @param mdName The name of the MD |
| 54 | * @param maName The name of the MA |
| 55 | * @param mepId The ID of the MEP |
| 56 | * @param dmId The Id of the Delay Measurement |
| 57 | * @param session An active NETCONF session |
| 58 | * @return mseaCfm |
| 59 | * @throws NetconfException if the session has any error |
| 60 | */ |
| 61 | MseaCfm getSoamDm(String mdName, String maName, int mepId, |
| 62 | int dmId, NetconfSession session) throws NetconfException; |
| 63 | |
| 64 | /** |
| 65 | * Sets the value to attribute mseaCfm. |
| 66 | * |
| 67 | * @param mseaCfm value of mseaCfm |
| 68 | * @param session An active NETCONF session |
| 69 | * @param targetDs one of running, candidate or startup |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 70 | * @return Boolean to indicate success or failure |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 71 | * @throws NetconfException if the session has any error |
| 72 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 73 | boolean setMseaCfm(MseaCfmOpParam mseaCfm, NetconfSession session, |
| 74 | DatastoreId targetDs) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 75 | |
| 76 | /** |
| 77 | * Service interface of transmitLoopback. |
| 78 | * |
| 79 | * @param inputVar input of service interface transmitLoopback |
| 80 | * @param session An active NETCONF session |
| 81 | * @throws NetconfException if the session has any error |
| 82 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 83 | void transmitLoopback(TransmitLoopbackInput inputVar, |
| 84 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 85 | |
| 86 | /** |
| 87 | * Service interface of abortLoopback. |
| 88 | * |
| 89 | * @param inputVar input of service interface abortLoopback |
| 90 | * @param session An active NETCONF session |
| 91 | * @throws NetconfException if the session has any error |
| 92 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 93 | void abortLoopback(AbortLoopbackInput inputVar, |
| 94 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 95 | |
| 96 | /** |
| 97 | * Service interface of transmitLinktrace. |
| 98 | * |
| 99 | * @param inputVar input of service interface transmitLinktrace |
| 100 | * @param session An active NETCONF session |
| 101 | * @return transmitLinktraceOutput output of service interface transmitLinktrace |
| 102 | * @throws NetconfException if the session has any error |
| 103 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 104 | TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar, |
| 105 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 106 | } |