Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 0a4e674 | 2016-09-15 23:03:10 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 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 | |
| 17 | package org.onosproject.patchpanel.impl; |
Jonathan Hart | 194e764 | 2016-12-15 15:33:34 -0800 | [diff] [blame] | 18 | |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 19 | import org.onosproject.net.ConnectPoint; |
| 20 | |
Jonathan Hart | 194e764 | 2016-12-15 15:33:34 -0800 | [diff] [blame] | 21 | import java.util.Set; |
| 22 | |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 23 | /** |
Jonathan Hart | 382119e | 2016-09-02 13:14:49 -0700 | [diff] [blame] | 24 | * A service for the patch panel application to export and use with the cli. |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 25 | */ |
| 26 | public interface PatchPanelService { |
| 27 | |
| 28 | /** |
Jonathan Hart | 382119e | 2016-09-02 13:14:49 -0700 | [diff] [blame] | 29 | * Adds a new patch between two connect points. |
| 30 | * |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 31 | * @param cp the first connect point |
| 32 | * @param cp2 the second connect point |
Ray Milkey | 0bb1e10 | 2016-11-10 14:51:27 -0800 | [diff] [blame] | 33 | * @return true if the patch was created, false otherwise |
Parvathi M | ef74963 | 2016-07-07 13:30:43 -0700 | [diff] [blame] | 34 | */ |
Jonathan Hart | 382119e | 2016-09-02 13:14:49 -0700 | [diff] [blame] | 35 | boolean addPatch(ConnectPoint cp, ConnectPoint cp2); |
Jonathan Hart | 194e764 | 2016-12-15 15:33:34 -0800 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Removes an existing patch. |
| 39 | * |
| 40 | * @param id patch ID |
| 41 | * @return true if the patch was removed, otherwise false. |
| 42 | */ |
| 43 | boolean removePatch(PatchId id); |
| 44 | |
| 45 | /** |
| 46 | * Gets the set of patches in the system. |
| 47 | * |
| 48 | * @return set of patches |
| 49 | */ |
| 50 | Set<Patch> getPatches(); |
Jonathan Hart | 382119e | 2016-09-02 13:14:49 -0700 | [diff] [blame] | 51 | } |