blob: ab7ff2916f16e1cedd703c9457e027f9b7cdd4c7 [file] [log] [blame]
Simon Hunt6fefd852017-11-13 17:09:43 -08001/*
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
17package org.onosproject.t3.api;
18
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010019import org.onlab.packet.EthType;
Simon Hunt6fefd852017-11-13 17:09:43 -080020import org.onosproject.net.ConnectPoint;
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010021import org.onosproject.net.HostId;
Simon Hunt6fefd852017-11-13 17:09:43 -080022import org.onosproject.net.flow.TrafficSelector;
Andrea Campanella41de8062018-02-28 16:43:16 +010023import org.onosproject.t3.impl.Generator;
Simon Hunt6fefd852017-11-13 17:09:43 -080024
Andrea Campanella6be5c872018-02-21 14:28:20 +010025import java.util.List;
Andrea Campanella79cb17d2018-02-27 18:03:17 +010026import java.util.Set;
Andrea Campanella6be5c872018-02-21 14:28:20 +010027
Simon Hunt6fefd852017-11-13 17:09:43 -080028/**
29 * API for troubleshooting services, providing static analysis of installed
30 * flows and groups.
31 */
32public interface TroubleshootService {
33
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010034 /**
Andrea Campanella6be5c872018-02-21 14:28:20 +010035 * Requests a static trace be performed between all hosts in the network, given a type of traffic.
36 *
37 * @param type the etherType of the traffic we want to trace.
38 * @return a trace result
39 */
40 List<StaticPacketTrace> pingAll(EthType.EtherType type);
41
42 /**
Andrea Campanella41de8062018-02-28 16:43:16 +010043 * Requests a static trace be performed between all hosts in the network, given a type of traffic.
44 *
45 * @param type the etherType of the traffic we want to trace.
46 * @return a trace result
47 */
48 Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type);
49
50 /**
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010051 * Requests a static trace be performed between the two hosts in the network, given a type of traffic.
52 *
53 * @param sourceHost source host
54 * @param destinationHost destination host
55 * @param type the etherType of the traffic we want to trace.
56 * @return a trace result
57 */
Andrea Campanella79cb17d2018-02-27 18:03:17 +010058 Set<StaticPacketTrace> trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type);
Simon Hunt6fefd852017-11-13 17:09:43 -080059
60 /**
61 * Requests a static trace be performed for the given traffic selector
62 * starting at the given connect point.
63 *
64 * @param packet description of packet
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010065 * @param in point at which packet starts
Simon Hunt6fefd852017-11-13 17:09:43 -080066 * @return a trace result
67 */
68 StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in);
69}