Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 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 | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 18 | import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdShort; |
| 19 | import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MdId; |
| 20 | import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MepId; |
| 21 | import org.onosproject.incubator.net.l2monitoring.soam.SoamId; |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 22 | import org.onosproject.netconf.DatastoreId; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 23 | import org.onosproject.netconf.NetconfException; |
| 24 | import org.onosproject.netconf.NetconfSession; |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 25 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm; |
| 26 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfmOpParam; |
| 27 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.abortloopback.AbortLoopbackInput; |
| 28 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput; |
| 29 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput; |
| 30 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitloopback.TransmitLoopbackInput; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 31 | |
| 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 38 | public interface MseaCfmNetconfService { |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 39 | |
| 40 | /** |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 41 | * Returns minimal set of attributes of MEP. |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 42 | * |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 43 | * @param mdId The name of the MD |
| 44 | * @param maId The name of the MA |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 45 | * @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 Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 50 | MseaCfm getMepEssentials(MdId mdId, MaIdShort maId, MepId mepId, |
| 51 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 52 | |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 53 | /** |
| 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 Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 67 | |
| 68 | /** |
| 69 | * Returns attributes of DM. |
| 70 | * |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 71 | * @param mdId The name of the MD |
| 72 | * @param maId The name of the MA |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 73 | * @param mepId The ID of the MEP |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 74 | * @param dmId The Id of the Delay Measurement - if null then all DMs |
| 75 | * @param parts The parts of the DM to return |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 76 | * @param session An active NETCONF session |
| 77 | * @return mseaCfm |
| 78 | * @throws NetconfException if the session has any error |
| 79 | */ |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 80 | MseaCfm getSoamDm(MdId mdId, MaIdShort maId, MepId mepId, |
| 81 | SoamId dmId, DmEntryParts parts, NetconfSession session) |
| 82 | throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 83 | |
| 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 90 | * @return Boolean to indicate success or failure |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 91 | * @throws NetconfException if the session has any error |
| 92 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 93 | boolean setMseaCfm(MseaCfmOpParam mseaCfm, NetconfSession session, |
| 94 | DatastoreId targetDs) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 95 | |
| 96 | /** |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 97 | * 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 Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 124 | * 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 130 | void transmitLoopback(TransmitLoopbackInput inputVar, |
| 131 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 132 | |
| 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 140 | void abortLoopback(AbortLoopbackInput inputVar, |
| 141 | NetconfSession session) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 142 | |
| 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame] | 151 | TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar, |
| 152 | NetconfSession session) throws NetconfException; |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 153 | |
| 154 | public enum DmEntryParts { |
| 155 | ALL_PARTS, |
| 156 | CURRENT_ONLY, |
| 157 | HISTORY_ONLY; |
| 158 | } |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 159 | } |