blob: 4ece312866cf17979aa30198ed6809f1ae994960 [file] [log] [blame]
Parvathi Mef749632016-07-07 13:30:43 -07001/*
Brian O'Connor0a4e6742016-09-15 23:03:10 -07002 * Copyright 2016-present Open Networking Laboratory
Parvathi Mef749632016-07-07 13:30:43 -07003 *
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.patchpanel.impl;
Jonathan Hart194e7642016-12-15 15:33:34 -080018
Parvathi Mef749632016-07-07 13:30:43 -070019import org.onosproject.net.ConnectPoint;
20
Jonathan Hart194e7642016-12-15 15:33:34 -080021import java.util.Set;
22
Parvathi Mef749632016-07-07 13:30:43 -070023/**
Jonathan Hart382119e2016-09-02 13:14:49 -070024 * A service for the patch panel application to export and use with the cli.
Parvathi Mef749632016-07-07 13:30:43 -070025 */
26public interface PatchPanelService {
27
28 /**
Jonathan Hart382119e2016-09-02 13:14:49 -070029 * Adds a new patch between two connect points.
30 *
Parvathi Mef749632016-07-07 13:30:43 -070031 * @param cp the first connect point
32 * @param cp2 the second connect point
Ray Milkey0bb1e102016-11-10 14:51:27 -080033 * @return true if the patch was created, false otherwise
Parvathi Mef749632016-07-07 13:30:43 -070034 */
Jonathan Hart382119e2016-09-02 13:14:49 -070035 boolean addPatch(ConnectPoint cp, ConnectPoint cp2);
Jonathan Hart194e7642016-12-15 15:33:34 -080036
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 Hart382119e2016-09-02 13:14:49 -070051}