Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-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 | |
| 17 | package org.onosproject.t3.api; |
| 18 | |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 19 | import org.onlab.packet.EthType; |
Andrea Campanella | fa3ec19 | 2018-04-06 16:30:18 +0200 | [diff] [blame] | 20 | import org.onlab.packet.VlanId; |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 21 | import org.onosproject.net.ConnectPoint; |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 22 | import org.onosproject.net.HostId; |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 23 | import org.onosproject.net.flow.TrafficSelector; |
Andrea Campanella | 41de806 | 2018-02-28 16:43:16 +0100 | [diff] [blame] | 24 | import org.onosproject.t3.impl.Generator; |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 25 | |
Andrea Campanella | 6be5c87 | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 26 | import java.util.List; |
Andrea Campanella | 79cb17d | 2018-02-27 18:03:17 +0100 | [diff] [blame] | 27 | import java.util.Set; |
Andrea Campanella | 6be5c87 | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 28 | |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 29 | /** |
| 30 | * API for troubleshooting services, providing static analysis of installed |
| 31 | * flows and groups. |
| 32 | */ |
| 33 | public interface TroubleshootService { |
| 34 | |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 35 | /** |
Andrea Campanella | 6be5c87 | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 36 | * Requests a static trace be performed between all hosts in the network, given a type of traffic. |
| 37 | * |
| 38 | * @param type the etherType of the traffic we want to trace. |
| 39 | * @return a trace result |
| 40 | */ |
| 41 | List<StaticPacketTrace> pingAll(EthType.EtherType type); |
| 42 | |
| 43 | /** |
Andrea Campanella | 41de806 | 2018-02-28 16:43:16 +0100 | [diff] [blame] | 44 | * Requests a static trace be performed between all hosts in the network, given a type of traffic. |
| 45 | * |
| 46 | * @param type the etherType of the traffic we want to trace. |
| 47 | * @return a trace result |
| 48 | */ |
| 49 | Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type); |
| 50 | |
| 51 | /** |
Andrea Campanella | fa3ec19 | 2018-04-06 16:30:18 +0200 | [diff] [blame] | 52 | * Requests a static trace be performed for all mcast Routes in the network. |
| 53 | * |
| 54 | * @param vlanId the vlanId configured for multicast. |
| 55 | * @return a set of trace result yielded one by one. |
| 56 | */ |
| 57 | Generator<Set<StaticPacketTrace>> traceMcast(VlanId vlanId); |
| 58 | |
| 59 | /** |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 60 | * Requests a static trace be performed between the two hosts in the network, given a type of traffic. |
| 61 | * |
| 62 | * @param sourceHost source host |
| 63 | * @param destinationHost destination host |
| 64 | * @param type the etherType of the traffic we want to trace. |
| 65 | * @return a trace result |
| 66 | */ |
Andrea Campanella | 79cb17d | 2018-02-27 18:03:17 +0100 | [diff] [blame] | 67 | Set<StaticPacketTrace> trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type); |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 68 | |
| 69 | /** |
| 70 | * Requests a static trace be performed for the given traffic selector |
| 71 | * starting at the given connect point. |
| 72 | * |
| 73 | * @param packet description of packet |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 74 | * @param in point at which packet starts |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 75 | * @return a trace result |
| 76 | */ |
| 77 | StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in); |
psneha | 5c9f51b | 2018-08-02 07:41:43 -0400 | [diff] [blame] | 78 | |
| 79 | /** |
| 80 | * Requests list of static trace to be performed for all mcast routes in the network. |
| 81 | * |
| 82 | * @param vlanId the vlan id configured for multicast |
| 83 | * @return a list of trace result |
| 84 | */ |
| 85 | List<Set<StaticPacketTrace>> getMulitcastTrace(VlanId vlanId); |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 86 | } |