Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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.incubator.net.l2monitoring.soam.loss; |
| 17 | |
| 18 | import java.time.Duration; |
| 19 | import java.util.Collection; |
| 20 | |
| 21 | import org.onosproject.incubator.net.l2monitoring.soam.MeasurementCreateBase; |
| 22 | import org.onosproject.incubator.net.l2monitoring.soam.MilliPct; |
| 23 | import org.onosproject.incubator.net.l2monitoring.soam.SoamConfigException; |
| 24 | |
| 25 | /** |
| 26 | * Object to support creation of Loss Measurement tests. |
| 27 | */ |
| 28 | public interface LossMeasurementCreate extends MeasurementCreateBase { |
| 29 | /** |
| 30 | * The type of Loss Measurement that will be performed. |
| 31 | * @return A loss Measurement type |
| 32 | */ |
| 33 | LmType lmCfgType(); |
| 34 | |
| 35 | /** |
| 36 | * A vector of bits that indicates the type of SOAM LM counters found. |
| 37 | * in the current-stats and history-stats that are enabled. |
| 38 | * A present bit enables the specific SOAM LM counter. A not present bit disables the SOAM LM counter. |
| 39 | * If a particular SOAM LM counter is not supported the BIT value is not present. |
| 40 | * Not all SOAM LM counters are supported for all SOAM LM types. |
| 41 | * @return A collection of bit options |
| 42 | */ |
| 43 | Collection<CounterOption> countersEnabled(); |
| 44 | |
| 45 | /** |
Sean Condon | 081290d | 2017-11-02 13:15:08 +0000 | [diff] [blame] | 46 | * This object specifies the availability measurement interval. |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame] | 47 | * A measurement interval of 15 minutes is to be supported, other intervals can be supported |
| 48 | * @return A java Duration |
| 49 | */ |
| 50 | Duration availabilityMeasurementInterval(); |
| 51 | |
| 52 | /** |
| 53 | * Specifies a configurable number of consecutive loss measurement PDUs. |
| 54 | * to be used in evaluating the availability/unavailability status of each |
| 55 | * availability indicator per MEF 10.2.1. |
| 56 | * Loss Measurement PDUs (LMMs, CCMs or SLMs) are sent regularly with a |
| 57 | * period defined by message-period. Therefore, this object, when multiplied |
| 58 | * by message-period, is equivalent to the Availability parameter of 'delta_t' |
| 59 | * as specified by MEF 10.2.1. |
| 60 | * |
| 61 | * If the measurement-type is lmm or ccm, this object defines the number of |
| 62 | * LMM or CCM PDUs transmitted during each 'delta_t' period. The Availability |
| 63 | * flr for a given 'delta_t' can be calculated based on the counters in the |
| 64 | * last LMM/R or CCM during this 'delta_t' and the last LMM/R or CCM in the |
| 65 | * previous 'delta_t'. |
| 66 | * |
| 67 | * If the measurement-type is slm, this object defines the number of SLM PDUs |
| 68 | * transmitted during each 'delta_t' period. The Availability flr for a |
| 69 | * given 'delta_t' is calculated based on the number of those SLM PDUs that are lost. |
| 70 | * |
| 71 | * If the measurement-type is lmm or ccm, the number range of 1 through 10 |
| 72 | * must be supported. The number range of 10 through 1000000 may be supported, |
| 73 | * but is not mandatory. |
| 74 | * |
| 75 | * If the measurement-type is slm, the number range of 10 through 100 must be |
| 76 | * supported. The number range of 100 through 1000000 may be supported, |
| 77 | * but is not mandatory |
| 78 | * @return number of consecutive loss measurement PDUs |
| 79 | */ |
| 80 | Integer availabilityNumberConsecutiveFlrMeasurements(); |
| 81 | |
| 82 | /** |
| 83 | * Specifies a configurable availability threshold to be used in evaluating |
| 84 | * the availability/unavailability status of an availability indicator per |
| 85 | * MEF 10.2.1. The availability threshold range of 0.00 (0) through 1.00 (100000) |
| 86 | * is supported. This parameter is equivalent to the Availability parameter |
| 87 | * of 'C' as specified by MEF 10.2.1. |
| 88 | * @return Units are in milli-percent, where 1 indicates 0.001 percent |
| 89 | */ |
| 90 | MilliPct availabilityFlrThreshold(); |
| 91 | |
| 92 | /** |
| 93 | * Specifies a configurable number of consecutive availability indicators to |
| 94 | * be used to determine a change in the availability status as indicated by |
| 95 | * MEF 10.2.1. This parameter is equivalent to the Availability parameter of |
| 96 | * 'n' as specified by MEF 10.2.1. |
| 97 | * The number range of 1 through 10 must be supported. |
| 98 | * The number range of 1 through 1000 may be supported, but is not mandatory |
| 99 | * @return number of consecutive availability indicators |
| 100 | */ |
| 101 | Short availabilityNumberConsecutiveIntervals(); |
| 102 | |
| 103 | /** |
| 104 | * Specifies a configurable number of consecutive availability indicators. |
| 105 | * to be used for assessing CHLI. This parameter is equivalent to the |
| 106 | * Resilency parameter of 'p' as specified by MEF 10.2.1. |
| 107 | * |
| 108 | * Availability-consecutive-high-flr must be strictly less than |
| 109 | * availability-number-consecutive-intervals. If not, the count of high loss |
| 110 | * intervals over time, and the count of consecutive high loss levels, is disabled. |
| 111 | * |
| 112 | * The number range of 1 through 10 must be supported. The number range of 1 |
| 113 | * through 1000 may be supported, but is not mandatory |
| 114 | * @return number of consecutive availability indicators |
| 115 | */ |
| 116 | Short availabilityNumberConsecutiveHighFlr(); |
| 117 | |
| 118 | /** |
| 119 | * The list of Loss Measurement configuration threshold values for LM Performance Monitoring. |
| 120 | * The main purpose of the threshold configuration list is to configure |
| 121 | * threshold alarm notifications indicating that a specific performance metric |
| 122 | * is not being met |
| 123 | * @return A collection of Loss Measurement Thresholds |
| 124 | */ |
| 125 | Collection<LossMeasurementThreshold> lossMeasurementThreshold(); |
| 126 | |
| 127 | /** |
Sean Condon | 3a1efef | 2018-02-24 13:16:03 +0000 | [diff] [blame] | 128 | * Builder for {@link LossMeasurementCreate}. |
Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame] | 129 | */ |
| 130 | public interface LmCreateBuilder extends MeasCreateBaseBuilder { |
| 131 | |
| 132 | LmCreateBuilder addToCountersEnabled(CounterOption counterOption); |
| 133 | |
| 134 | LmCreateBuilder availabilityMeasurementInterval( |
| 135 | Duration availabilityMeasurementInterval); |
| 136 | |
| 137 | LmCreateBuilder availabilityNumberConsecutiveFlrMeasurements( |
| 138 | Integer availabilityNumberConsecutiveFlrMeasurements); |
| 139 | |
| 140 | LmCreateBuilder availabilityFlrThreshold(MilliPct availabilityFlrThreshold); |
| 141 | |
| 142 | LmCreateBuilder availabilityNumberConsecutiveIntervals( |
| 143 | Short availabilityNumberConsecutiveIntervals) throws SoamConfigException; |
| 144 | |
| 145 | LmCreateBuilder availabilityNumberConsecutiveHighFlr( |
| 146 | Short availabilityNumberConsecutiveHighFlr) throws SoamConfigException; |
| 147 | |
| 148 | LmCreateBuilder addToLossMeasurementThreshold( |
| 149 | LossMeasurementThreshold lossMeasurementThreshold); |
| 150 | |
| 151 | LossMeasurementCreate build(); |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Enumerated set of Loss Measurement types. |
| 156 | */ |
| 157 | public enum LmType { |
| 158 | /** |
| 159 | * LMM SOAM PDU generated and received LMR responses tracked. |
| 160 | */ |
| 161 | LMLMM, |
| 162 | /** |
| 163 | * SLM SOAM PDU generated and received SLR responses tracked. |
| 164 | */ |
| 165 | LMSLM, |
| 166 | /** |
| 167 | * CCM SOAM PDU generated and received CCM PDUs tracked. |
| 168 | */ |
| 169 | LMCCM; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Options for Counters that may be enabled. |
| 174 | */ |
| 175 | public enum CounterOption { |
| 176 | FORWARD_TRANSMITTED_FRAMES, |
| 177 | FORWARD_RECEIVED_FRAMES, |
| 178 | FORWARD_MIN_FLR, |
| 179 | FORWARD_MAX_FLR, |
| 180 | FORWARD_AVERAGE_FLR, |
| 181 | BACKWARD_TRANSMITTED_FRAMES, |
| 182 | BACKWARD_RECEIVED_FRAMES, |
| 183 | BACKWARD_MIN_FLR, |
| 184 | BACKWARD_MAX_FLR, |
| 185 | BACKWARD_AVERAGE_FLR, |
| 186 | SOAM_PDUS_SENT, |
| 187 | SOAM_PDUS_RECEIVED, |
| 188 | AVAILABILITY_FORWARD_HIGH_LOSS, |
| 189 | AVAILABILITY_FORWARD_CONSECUTIVE_HIGH_LOSS, |
| 190 | AVAILABILITY_FORWARD_AVAILABLE, |
| 191 | AVAILABILITY_FORWARD_UNAVAILABLE, |
| 192 | AVAILABILILITY_FORWARD_MIN_FLR, |
| 193 | AVAILABILITY_FORWARD_MAX_FLR, |
| 194 | AVAILABILITY_FORWARD_AVERAGE_FLR, |
| 195 | AVAILABILITY_BACKWARD_HIGH_LOSS, |
| 196 | AVAILABILITY_BACKWARD_CONSECUTIVE_HIGH_LOSS, |
| 197 | AVAILABILITY_BACKWARD_AVAILABLE, |
| 198 | AVAILABLE_BACKWARD_UNAVAILABLE, |
| 199 | AVAILABLE_BACKWARD_MIN_FLR, |
| 200 | AVAILABLE_BACKWARD_MAX_FLR, |
| 201 | AVAILABLE_BACKWARD_AVERAGE_FLR, |
| 202 | MEASURED_STATS_FORWARD_MEASURED_FLR, |
| 203 | MEASURED_STATS_BACKWARD_MEASURED_FLR, |
| 204 | MEASURED_STATS_AVAILABILITY_FORWARD_STATUS, |
| 205 | MEASURED_STATS_AVAILABILITY_BACKWARD_STATUS; |
| 206 | } |
| 207 | } |