Simon Hunt | 026a287 | 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 | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 19 | import org.onlab.packet.EthType; |
Andrea Campanella | bd15bf5 | 2018-04-06 16:30:18 +0200 | [diff] [blame] | 20 | import org.onlab.packet.VlanId; |
pierventre | fe57fda | 2020-08-04 22:52:02 +0200 | [diff] [blame^] | 21 | import org.onlab.util.Generator; |
Simon Hunt | 026a287 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 22 | import org.onosproject.net.ConnectPoint; |
Andrea Campanella | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 23 | import org.onosproject.net.HostId; |
Simon Hunt | 026a287 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 24 | import org.onosproject.net.flow.TrafficSelector; |
| 25 | |
Andrea Campanella | 6a614fa | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 26 | import java.util.List; |
Andrea Campanella | 696ef03 | 2018-02-27 18:03:17 +0100 | [diff] [blame] | 27 | import java.util.Set; |
Andrea Campanella | 6a614fa | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 28 | |
Simon Hunt | 026a287 | 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 | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 35 | /** |
Andrea Campanella | 6a614fa | 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. |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 39 | * @return trace result |
pierventre | fe57fda | 2020-08-04 22:52:02 +0200 | [diff] [blame^] | 40 | * @deprecated in t3-4.0 |
Andrea Campanella | 6a614fa | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 41 | */ |
pierventre | fe57fda | 2020-08-04 22:52:02 +0200 | [diff] [blame^] | 42 | @Deprecated |
Andrea Campanella | 6a614fa | 2018-02-21 14:28:20 +0100 | [diff] [blame] | 43 | List<StaticPacketTrace> pingAll(EthType.EtherType type); |
| 44 | |
| 45 | /** |
Andrea Campanella | 0cc6acd | 2018-02-28 16:43:16 +0100 | [diff] [blame] | 46 | * Requests a static trace be performed between all hosts in the network, given a type of traffic. |
| 47 | * |
| 48 | * @param type the etherType of the traffic we want to trace. |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 49 | * @return trace result |
Andrea Campanella | 0cc6acd | 2018-02-28 16:43:16 +0100 | [diff] [blame] | 50 | */ |
| 51 | Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type); |
| 52 | |
| 53 | /** |
Andrea Campanella | bd15bf5 | 2018-04-06 16:30:18 +0200 | [diff] [blame] | 54 | * Requests a static trace be performed for all mcast Routes in the network. |
| 55 | * |
| 56 | * @param vlanId the vlanId configured for multicast. |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 57 | * @return set of trace result yielded one by one. |
Andrea Campanella | bd15bf5 | 2018-04-06 16:30:18 +0200 | [diff] [blame] | 58 | */ |
| 59 | Generator<Set<StaticPacketTrace>> traceMcast(VlanId vlanId); |
| 60 | |
| 61 | /** |
Andrea Campanella | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 62 | * Requests a static trace be performed between the two hosts in the network, given a type of traffic. |
| 63 | * |
| 64 | * @param sourceHost source host |
| 65 | * @param destinationHost destination host |
| 66 | * @param type the etherType of the traffic we want to trace. |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 67 | * @return trace result |
Andrea Campanella | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 68 | */ |
Andrea Campanella | 696ef03 | 2018-02-27 18:03:17 +0100 | [diff] [blame] | 69 | Set<StaticPacketTrace> trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type); |
Simon Hunt | 026a287 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 70 | |
| 71 | /** |
| 72 | * Requests a static trace be performed for the given traffic selector |
| 73 | * starting at the given connect point. |
| 74 | * |
| 75 | * @param packet description of packet |
Andrea Campanella | 55c3f42 | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 76 | * @param in point at which packet starts |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 77 | * @return trace result |
Simon Hunt | 026a287 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 78 | */ |
| 79 | StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in); |
psneha | b823c51 | 2018-08-02 07:41:43 -0400 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * Requests list of static trace to be performed for all mcast routes in the network. |
| 83 | * |
| 84 | * @param vlanId the vlan id configured for multicast |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 85 | * @return list of trace result |
pierventre | fe57fda | 2020-08-04 22:52:02 +0200 | [diff] [blame^] | 86 | * @deprecated in t3-4.0 |
psneha | b823c51 | 2018-08-02 07:41:43 -0400 | [diff] [blame] | 87 | */ |
pierventre | fe57fda | 2020-08-04 22:52:02 +0200 | [diff] [blame^] | 88 | @Deprecated |
psneha | b823c51 | 2018-08-02 07:41:43 -0400 | [diff] [blame] | 89 | List<Set<StaticPacketTrace>> getMulitcastTrace(VlanId vlanId); |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 90 | |
| 91 | /** |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 92 | * Checks the validity of NIBs applied to the manager. |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 93 | * |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 94 | * @return true only if all NIBs are in the valid state. |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 95 | */ |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 96 | boolean checkNibValidity(); |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 97 | |
| 98 | /** |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 99 | * Returns a summary describing all the NIBs applied to the manager. |
| 100 | * |
| 101 | * @return string for the summary |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 102 | */ |
Seyeon Jeong | 5018bdd | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 103 | String printNibSummary(); |
Seyeon Jeong | 83e7986 | 2020-02-28 01:17:34 -0800 | [diff] [blame] | 104 | |
Simon Hunt | 026a287 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 105 | } |