Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-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 | |
| 17 | package org.onosproject.incubator.net.virtual.provider; |
| 18 | |
Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 19 | import org.onosproject.net.DeviceId; |
| 20 | import org.onosproject.net.meter.Meter; |
| 21 | import org.onosproject.net.meter.MeterFailReason; |
| 22 | import org.onosproject.net.meter.MeterOperation; |
| 23 | |
| 24 | import java.util.Collection; |
| 25 | |
| 26 | /** |
| 27 | * Service through which meter providers can inject information |
| 28 | * into the virtual network subsystem core. |
| 29 | */ |
| 30 | public interface VirtualMeterProviderService |
| 31 | extends VirtualProviderService<VirtualMeterProvider> { |
| 32 | /** |
| 33 | * Notifies the core that a meter operation failed for a |
| 34 | * specific reason. |
| 35 | * |
Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 36 | * @param operation the failed operation |
| 37 | * @param reason the failure reason |
| 38 | */ |
yoonseon | d6ba9a6 | 2017-01-30 11:48:07 -0800 | [diff] [blame^] | 39 | void meterOperationFailed(MeterOperation operation, MeterFailReason reason); |
Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * Pushes the collection of meters observed on the virtual data plane as |
| 43 | * well as their associated statistics. |
| 44 | * |
Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 45 | * @param deviceId a device id |
| 46 | * @param meterEntries a collection of meter entries |
| 47 | */ |
yoonseon | d6ba9a6 | 2017-01-30 11:48:07 -0800 | [diff] [blame^] | 48 | void pushMeterMetrics(DeviceId deviceId, Collection<Meter> meterEntries); |
Yoonseon Han | fd7024f | 2016-10-20 13:29:10 -0700 | [diff] [blame] | 49 | } |