blob: 3ab60526a9259968f568649fa1799f868daa1b36 [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;
Andrea Campanellafa3ec192018-04-06 16:30:18 +020020import org.onlab.packet.VlanId;
Simon Hunt6fefd852017-11-13 17:09:43 -080021import org.onosproject.net.ConnectPoint;
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010022import org.onosproject.net.HostId;
Simon Hunt6fefd852017-11-13 17:09:43 -080023import org.onosproject.net.flow.TrafficSelector;
Andrea Campanella41de8062018-02-28 16:43:16 +010024import org.onosproject.t3.impl.Generator;
Simon Hunt6fefd852017-11-13 17:09:43 -080025
Andrea Campanella6be5c872018-02-21 14:28:20 +010026import java.util.List;
Andrea Campanella79cb17d2018-02-27 18:03:17 +010027import java.util.Set;
Andrea Campanella6be5c872018-02-21 14:28:20 +010028
Simon Hunt6fefd852017-11-13 17:09:43 -080029/**
30 * API for troubleshooting services, providing static analysis of installed
31 * flows and groups.
32 */
33public interface TroubleshootService {
34
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010035 /**
Andrea Campanella6be5c872018-02-21 14:28:20 +010036 * 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 Jeongac129562020-02-28 01:17:34 -080039 * @return trace result
Andrea Campanella6be5c872018-02-21 14:28:20 +010040 */
41 List<StaticPacketTrace> pingAll(EthType.EtherType type);
42
43 /**
Andrea Campanella41de8062018-02-28 16:43:16 +010044 * 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.
Seyeon Jeongac129562020-02-28 01:17:34 -080047 * @return trace result
Andrea Campanella41de8062018-02-28 16:43:16 +010048 */
49 Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type);
50
51 /**
Andrea Campanellafa3ec192018-04-06 16:30:18 +020052 * Requests a static trace be performed for all mcast Routes in the network.
53 *
54 * @param vlanId the vlanId configured for multicast.
Seyeon Jeongac129562020-02-28 01:17:34 -080055 * @return set of trace result yielded one by one.
Andrea Campanellafa3ec192018-04-06 16:30:18 +020056 */
57 Generator<Set<StaticPacketTrace>> traceMcast(VlanId vlanId);
58
59 /**
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010060 * 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.
Seyeon Jeongac129562020-02-28 01:17:34 -080065 * @return trace result
Andrea Campanellaaf34b7c2018-02-08 17:10:11 +010066 */
Andrea Campanella79cb17d2018-02-27 18:03:17 +010067 Set<StaticPacketTrace> trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type);
Simon Hunt6fefd852017-11-13 17:09:43 -080068
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 Campanellaaf34b7c2018-02-08 17:10:11 +010074 * @param in point at which packet starts
Seyeon Jeongac129562020-02-28 01:17:34 -080075 * @return trace result
Simon Hunt6fefd852017-11-13 17:09:43 -080076 */
77 StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in);
psneha5c9f51b2018-08-02 07:41:43 -040078
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
Seyeon Jeongac129562020-02-28 01:17:34 -080083 * @return list of trace result
psneha5c9f51b2018-08-02 07:41:43 -040084 */
85 List<Set<StaticPacketTrace>> getMulitcastTrace(VlanId vlanId);
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080086
87 /**
Seyeon Jeongac129562020-02-28 01:17:34 -080088 * Checks the validity of NIBs applied to the manager.
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080089 *
Seyeon Jeongac129562020-02-28 01:17:34 -080090 * @return true only if all NIBs are in the valid state.
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080091 */
Seyeon Jeongac129562020-02-28 01:17:34 -080092 boolean checkNibValidity();
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080093
94 /**
Seyeon Jeongac129562020-02-28 01:17:34 -080095 * Returns a summary describing all the NIBs applied to the manager.
96 *
97 * @return string for the summary
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080098 */
Seyeon Jeongac129562020-02-28 01:17:34 -080099 String printNibSummary();
Seyeon Jeong8d3cad22020-02-28 01:17:34 -0800100
Simon Hunt6fefd852017-11-13 17:09:43 -0800101}