blob: c2fb8937abeee0cfc3ce84b52553006b46761ee1 [file] [log] [blame]
Boyoung Jeong9e8faec2018-06-17 21:19:23 +09001/*
2 * Copyright 2018-present Open Networking Foundation
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 */
16package org.onosproject.openstacktelemetry.api;
17
Boyoung Jeong1cca5e82018-08-01 21:00:08 +090018import java.util.Map;
19import java.util.Queue;
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090020import java.util.Set;
21
22/**
23 * Admin service API for making a flow rule.
24 */
25public interface StatsFlowRuleAdminService {
26
27 /**
Jian Li0bbbb1c2018-06-22 22:01:17 +090028 * Starts this service.
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090029 */
30 void start();
31
32 /**
Jian Li0bbbb1c2018-06-22 22:01:17 +090033 * Stops this service.
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090034 */
35 void stop();
36
37 /**
boyoung27b444122018-09-01 17:28:13 +090038 * Creates or delete a stat flow rule with network layer-2 information.
39 *
40 * @param srcIp source IP address
41 * @param dstIp destination IP address
42 * @param install installing flag
43 */
44 void setStatFlowL2Rule(String srcIp, String dstIp, Boolean install);
45
46 /**
Jian Li0bbbb1c2018-06-22 22:01:17 +090047 * Creates a stat flow rule.
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090048 *
Jian Li0bbbb1c2018-06-22 22:01:17 +090049 * @param statFlowRule stat flow rule for a VM
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090050 */
Jian Li0bbbb1c2018-06-22 22:01:17 +090051 void createStatFlowRule(StatsFlowRule statFlowRule);
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090052
53 /**
Jian Lif8b8c7f2018-08-27 18:49:04 +090054 * Gets a set of flow infos collected from overlay network.
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090055 *
Jian Li0bbbb1c2018-06-22 22:01:17 +090056 * @return a set of flow infos
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090057 */
Jian Lif8b8c7f2018-08-27 18:49:04 +090058 Set<FlowInfo> getOverlayFlowInfos();
59
60 /**
61 * Gets a set of flow infos collected from underlay network.
62 *
63 * @return a set of flow infos
64 */
65 Set<FlowInfo> getUnderlayFlowInfos();
Jian Li0bbbb1c2018-06-22 22:01:17 +090066
67 /**
68 * Deletes stat flow rule.
69 *
70 * @param statFlowRule stat flow rule for a VM
71 */
72 void deleteStatFlowRule(StatsFlowRule statFlowRule);
Boyoung Jeong1cca5e82018-08-01 21:00:08 +090073
74 /**
75 * Gets a map of flow information.
76 *
77 * @return a map of flow infos
78 */
79 Map<String, Queue<FlowInfo>> getFlowInfoMap();
80
Boyoung Jeong9e8faec2018-06-17 21:19:23 +090081}