blob: 46e4a7d7512f3f42a57b35669a650075ed29ade9 [file] [log] [blame]
Yoonseon Hanfd7024f2016-10-20 13:29:10 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Yoonseon Hanfd7024f2016-10-20 13:29:10 -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 */
16
17package org.onosproject.incubator.net.virtual.provider;
18
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070019import org.onosproject.net.DeviceId;
20import org.onosproject.net.meter.Meter;
21import org.onosproject.net.meter.MeterFailReason;
yoonseon94672112017-01-31 13:46:21 -080022import org.onosproject.net.meter.MeterFeatures;
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070023import org.onosproject.net.meter.MeterOperation;
24
25import java.util.Collection;
26
27/**
28 * Service through which meter providers can inject information
29 * into the virtual network subsystem core.
30 */
31public interface VirtualMeterProviderService
32 extends VirtualProviderService<VirtualMeterProvider> {
33 /**
34 * Notifies the core that a meter operation failed for a
35 * specific reason.
36 *
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070037 * @param operation the failed operation
38 * @param reason the failure reason
39 */
yoonseond6ba9a62017-01-30 11:48:07 -080040 void meterOperationFailed(MeterOperation operation, MeterFailReason reason);
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070041
42 /**
yoonseon94672112017-01-31 13:46:21 -080043 * Pushes the collection of meters observed on the data plane as
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070044 * well as their associated statistics.
45 *
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070046 * @param deviceId a device id
47 * @param meterEntries a collection of meter entries
48 */
yoonseond6ba9a62017-01-30 11:48:07 -080049 void pushMeterMetrics(DeviceId deviceId, Collection<Meter> meterEntries);
yoonseon94672112017-01-31 13:46:21 -080050
51 /**
52 * Pushes the meter features collected from the device.
53 *
54 * @param deviceId the device Id
55 * @param meterfeatures the meter features
56 */
57 void pushMeterFeatures(DeviceId deviceId,
58 MeterFeatures meterfeatures);
59
60 /**
61 * Delete meter features collected from the device.
62 *
63 * @param deviceId the device id
64 */
65 void deleteMeterFeatures(DeviceId deviceId);
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070066}