blob: d9c2f59dadfa4c3a2e4307f4d7dcc04567142a62 [file] [log] [blame]
Simon Hunt026a2872017-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 Campanella55c3f422018-02-08 17:10:11 +010019import org.onlab.packet.EthType;
Andrea Campanellabd15bf52018-04-06 16:30:18 +020020import org.onlab.packet.VlanId;
pierventrefe57fda2020-08-04 22:52:02 +020021import org.onlab.util.Generator;
Simon Hunt026a2872017-11-13 17:09:43 -080022import org.onosproject.net.ConnectPoint;
Andrea Campanella55c3f422018-02-08 17:10:11 +010023import org.onosproject.net.HostId;
Simon Hunt026a2872017-11-13 17:09:43 -080024import org.onosproject.net.flow.TrafficSelector;
25
Andrea Campanella6a614fa2018-02-21 14:28:20 +010026import java.util.List;
Andrea Campanella696ef032018-02-27 18:03:17 +010027import java.util.Set;
Andrea Campanella6a614fa2018-02-21 14:28:20 +010028
Simon Hunt026a2872017-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 Campanella55c3f422018-02-08 17:10:11 +010035 /**
Andrea Campanella6a614fa2018-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 Jeong5018bdd2020-02-28 01:17:34 -080039 * @return trace result
pierventrefe57fda2020-08-04 22:52:02 +020040 * @deprecated in t3-4.0
Andrea Campanella6a614fa2018-02-21 14:28:20 +010041 */
pierventrefe57fda2020-08-04 22:52:02 +020042 @Deprecated
Andrea Campanella6a614fa2018-02-21 14:28:20 +010043 List<StaticPacketTrace> pingAll(EthType.EtherType type);
44
45 /**
Andrea Campanella0cc6acd2018-02-28 16:43:16 +010046 * 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 Jeong5018bdd2020-02-28 01:17:34 -080049 * @return trace result
Andrea Campanella0cc6acd2018-02-28 16:43:16 +010050 */
51 Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type);
52
53 /**
Andrea Campanellabd15bf52018-04-06 16:30:18 +020054 * Requests a static trace be performed for all mcast Routes in the network.
55 *
56 * @param vlanId the vlanId configured for multicast.
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080057 * @return set of trace result yielded one by one.
Andrea Campanellabd15bf52018-04-06 16:30:18 +020058 */
59 Generator<Set<StaticPacketTrace>> traceMcast(VlanId vlanId);
60
61 /**
Andrea Campanella55c3f422018-02-08 17:10:11 +010062 * 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 Jeong5018bdd2020-02-28 01:17:34 -080067 * @return trace result
Andrea Campanella55c3f422018-02-08 17:10:11 +010068 */
Andrea Campanella696ef032018-02-27 18:03:17 +010069 Set<StaticPacketTrace> trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type);
Simon Hunt026a2872017-11-13 17:09:43 -080070
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 Campanella55c3f422018-02-08 17:10:11 +010076 * @param in point at which packet starts
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080077 * @return trace result
Simon Hunt026a2872017-11-13 17:09:43 -080078 */
79 StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in);
psnehab823c512018-08-02 07:41:43 -040080
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 Jeong5018bdd2020-02-28 01:17:34 -080085 * @return list of trace result
pierventrefe57fda2020-08-04 22:52:02 +020086 * @deprecated in t3-4.0
psnehab823c512018-08-02 07:41:43 -040087 */
pierventrefe57fda2020-08-04 22:52:02 +020088 @Deprecated
psnehab823c512018-08-02 07:41:43 -040089 List<Set<StaticPacketTrace>> getMulitcastTrace(VlanId vlanId);
Seyeon Jeong83e79862020-02-28 01:17:34 -080090
91 /**
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080092 * Checks the validity of NIBs applied to the manager.
Seyeon Jeong83e79862020-02-28 01:17:34 -080093 *
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080094 * @return true only if all NIBs are in the valid state.
Seyeon Jeong83e79862020-02-28 01:17:34 -080095 */
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080096 boolean checkNibValidity();
Seyeon Jeong83e79862020-02-28 01:17:34 -080097
98 /**
Seyeon Jeong5018bdd2020-02-28 01:17:34 -080099 * Returns a summary describing all the NIBs applied to the manager.
100 *
101 * @return string for the summary
Seyeon Jeong83e79862020-02-28 01:17:34 -0800102 */
Seyeon Jeong5018bdd2020-02-28 01:17:34 -0800103 String printNibSummary();
Seyeon Jeong83e79862020-02-28 01:17:34 -0800104
Simon Hunt026a2872017-11-13 17:09:43 -0800105}