Jian Li | a118677 | 2018-07-27 18:06:41 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-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 | package org.onosproject.openstacktroubleshoot.api; |
| 17 | |
Jian Li | e189c1c | 2018-08-08 15:55:08 +0900 | [diff] [blame] | 18 | import org.onosproject.openstacknetworking.api.InstancePort; |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 19 | |
Jian Li | a118677 | 2018-07-27 18:06:41 +0900 | [diff] [blame] | 20 | /** |
| 21 | * Openstack troubleshoot interface. |
| 22 | */ |
| 23 | public interface OpenstackTroubleshootService { |
| 24 | |
| 25 | /** |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 26 | * Troubleshoot traffic direction. |
Jian Li | a118677 | 2018-07-27 18:06:41 +0900 | [diff] [blame] | 27 | */ |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 28 | enum Direction { |
| 29 | |
| 30 | /** |
| 31 | * Signifies that EAST_WEST troubleshoot case. |
| 32 | */ |
| 33 | EAST_WEST, |
| 34 | |
| 35 | /** |
| 36 | * Signifies that NORTH_SOUTH troubleshoot case. |
| 37 | */ |
| 38 | NORTH_SOUTH, |
| 39 | } |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * Checks a single VM-to-Vm connectivity. |
| 43 | * |
Jian Li | e189c1c | 2018-08-08 15:55:08 +0900 | [diff] [blame] | 44 | * @param srcInstancePort source instance port |
| 45 | * @param dstInstancePort destination instance port |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 46 | * @return reachability |
| 47 | */ |
Jian Li | e189c1c | 2018-08-08 15:55:08 +0900 | [diff] [blame] | 48 | Reachability probeEastWest(InstancePort srcInstancePort, |
| 49 | InstancePort dstInstancePort); |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 50 | |
| 51 | /** |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 52 | * Checks a single router-to-VM connectivity. |
| 53 | * |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 54 | * @param dstInstancePort destination instance port |
Jian Li | 0b93b00 | 2018-07-31 13:41:08 +0900 | [diff] [blame] | 55 | * @return reachability |
| 56 | */ |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 57 | Reachability probeNorthSouth(InstancePort dstInstancePort); |
Jian Li | a118677 | 2018-07-27 18:06:41 +0900 | [diff] [blame] | 58 | } |