Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.openstacktelemetry.api; |
| 17 | |
Boyoung Jeong | 1cca5e8 | 2018-08-01 21:00:08 +0900 | [diff] [blame] | 18 | import java.util.Map; |
| 19 | import java.util.Queue; |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 20 | import java.util.Set; |
| 21 | |
| 22 | /** |
| 23 | * Admin service API for making a flow rule. |
| 24 | */ |
| 25 | public interface StatsFlowRuleAdminService { |
| 26 | |
| 27 | /** |
Jian Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 28 | * Starts this service. |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 29 | */ |
| 30 | void start(); |
| 31 | |
| 32 | /** |
Jian Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 33 | * Stops this service. |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 34 | */ |
| 35 | void stop(); |
| 36 | |
| 37 | /** |
boyoung2 | 7b44412 | 2018-09-01 17:28:13 +0900 | [diff] [blame^] | 38 | * 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 Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 47 | * Creates a stat flow rule. |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 48 | * |
Jian Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 49 | * @param statFlowRule stat flow rule for a VM |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 50 | */ |
Jian Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 51 | void createStatFlowRule(StatsFlowRule statFlowRule); |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 52 | |
| 53 | /** |
Jian Li | f8b8c7f | 2018-08-27 18:49:04 +0900 | [diff] [blame] | 54 | * Gets a set of flow infos collected from overlay network. |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 55 | * |
Jian Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 56 | * @return a set of flow infos |
Boyoung Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 57 | */ |
Jian Li | f8b8c7f | 2018-08-27 18:49:04 +0900 | [diff] [blame] | 58 | 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 Li | 0bbbb1c | 2018-06-22 22:01:17 +0900 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * Deletes stat flow rule. |
| 69 | * |
| 70 | * @param statFlowRule stat flow rule for a VM |
| 71 | */ |
| 72 | void deleteStatFlowRule(StatsFlowRule statFlowRule); |
Boyoung Jeong | 1cca5e8 | 2018-08-01 21:00:08 +0900 | [diff] [blame] | 73 | |
| 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 Jeong | 9e8faec | 2018-06-17 21:19:23 +0900 | [diff] [blame] | 81 | } |