blob: c49c598674b4f3aeec6d6bb4d9381bf33d30232d [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
19import org.onosproject.incubator.net.virtual.NetworkId;
20import org.onosproject.net.DeviceId;
21import org.onosproject.net.meter.Meter;
22import org.onosproject.net.meter.MeterFailReason;
23import 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 *
37 * @param networkId the identity of the virtual network where this rule applies
38 * @param operation the failed operation
39 * @param reason the failure reason
40 */
41 void meterOperationFailed(NetworkId networkId, MeterOperation operation,
42 MeterFailReason reason);
43
44 /**
45 * Pushes the collection of meters observed on the virtual data plane as
46 * well as their associated statistics.
47 *
48 * @param networkId the identity of the virtual network where this rule applies
49 * @param deviceId a device id
50 * @param meterEntries a collection of meter entries
51 */
52 void pushMeterMetrics(NetworkId networkId, DeviceId deviceId,
53 Collection<Meter> meterEntries);
54}