blob: 17acdad36409eb00d24923a0be700e13b8a0f4c3 [file] [log] [blame]
Yoonseon Hanfd7024f2016-10-20 13:29:10 -07001/*
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
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;
22import org.onosproject.net.meter.MeterOperation;
23
24import java.util.Collection;
25
26/**
27 * Service through which meter providers can inject information
28 * into the virtual network subsystem core.
29 */
30public interface VirtualMeterProviderService
31 extends VirtualProviderService<VirtualMeterProvider> {
32 /**
33 * Notifies the core that a meter operation failed for a
34 * specific reason.
35 *
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070036 * @param operation the failed operation
37 * @param reason the failure reason
38 */
yoonseond6ba9a62017-01-30 11:48:07 -080039 void meterOperationFailed(MeterOperation operation, MeterFailReason reason);
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070040
41 /**
42 * Pushes the collection of meters observed on the virtual data plane as
43 * well as their associated statistics.
44 *
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070045 * @param deviceId a device id
46 * @param meterEntries a collection of meter entries
47 */
yoonseond6ba9a62017-01-30 11:48:07 -080048 void pushMeterMetrics(DeviceId deviceId, Collection<Meter> meterEntries);
Yoonseon Hanfd7024f2016-10-20 13:29:10 -070049}