blob: 9838e04fc09a5ab460e6b44d6464ea038d350d48 [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.
39 * @return a trace result
40 */
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.
47 * @return a trace result
48 */
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.
55 * @return a set of trace result yielded one by one.
56 */
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.
65 * @return a trace result
66 */
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
Simon Hunt6fefd852017-11-13 17:09:43 -080075 * @return a trace result
76 */
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
83 * @return a list of trace result
84 */
85 List<Set<StaticPacketTrace>> getMulitcastTrace(VlanId vlanId);
Seyeon Jeong8d3cad22020-02-28 01:17:34 -080086
87 /**
88 * Checks the availability of all NIBs of the manager.
89 *
90 * @return true if any NIB objects is unavailable
91 */
92 boolean checkNibsUnavailable();
93
94 /**
95 * Applies created NIBs to the manager.
96 */
97 void applyNibs();
98
Simon Hunt6fefd852017-11-13 17:09:43 -080099}