blob: e96e2249199d9b09ac3c5dfba8cd8d7e88188a96 [file] [log] [blame]
alshabibbc371962015-07-09 22:26:21 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
alshabibbc371962015-07-09 22:26:21 -07003 *
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 */
alshabib10c810b2015-08-18 16:59:04 -070016package org.onosproject.net.meter;
alshabibbc371962015-07-09 22:26:21 -070017
18import org.onosproject.net.DeviceId;
19import org.onosproject.net.provider.ProviderService;
20
21import java.util.Collection;
22
23/**
24 * Service through which meter providers can inject information
25 * into the core.
26 */
27public interface MeterProviderService extends ProviderService<MeterProvider> {
28
29 /**
30 * Notifies the core that a meter operaton failed for a
31 * specific reason.
alshabibc7911792015-07-30 17:55:30 -070032 * @param operation the failed operation
33 * @param reason the failure reason
alshabibbc371962015-07-09 22:26:21 -070034 */
alshabibc7911792015-07-30 17:55:30 -070035 void meterOperationFailed(MeterOperation operation,
alshabibbc371962015-07-09 22:26:21 -070036 MeterFailReason reason);
37
38 /**
39 * Pushes the collection of meters observed on the data plane as
40 * well as their associated statistics.
41 *
42 * @param deviceId a device id
43 * @param meterEntries a collection of meter entries
44 */
45 void pushMeterMetrics(DeviceId deviceId,
46 Collection<Meter> meterEntries);
47
Jordi Ortizaa8de492016-12-01 00:21:36 +010048 /**
49 * Pushes the meter features collected from the device.
50 *
51 * @param deviceId the device Id
52 * @param meterfeatures the meter features
53 */
54 void pushMeterFeatures(DeviceId deviceId,
55 MeterFeatures meterfeatures);
56
Wailok Shumf013a782021-07-26 16:51:01 +080057 /**
58 * Pushes the collection of meter features collected from the device.
59 *
60 * @param deviceId the device Id
61 * @param meterfeatures the meter features
62 */
63 void pushMeterFeatures(DeviceId deviceId,
64 Collection<MeterFeatures> meterfeatures);
Jordi Ortizaa8de492016-12-01 00:21:36 +010065
66 /**
67 * Delete meter features collected from the device.
68 *
69 * @param deviceId the device id
70 */
71 void deleteMeterFeatures(DeviceId deviceId);
alshabibbc371962015-07-09 22:26:21 -070072
73}