Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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.cordfabric; |
| 18 | |
Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 19 | import org.onlab.packet.VlanId; |
Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 20 | |
| 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * Service used to interact with fabric. |
| 25 | */ |
| 26 | public interface FabricService { |
| 27 | |
| 28 | /** |
| 29 | * Remaps a vlan to the specified ports. The specified ports will be the |
| 30 | * only ports in this vlan once the operation completes. |
| 31 | * |
Jonathan Hart | 443ebed | 2015-05-05 14:02:12 -0700 | [diff] [blame] | 32 | * @param vlan vlan object to add |
Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 33 | */ |
Jonathan Hart | 443ebed | 2015-05-05 14:02:12 -0700 | [diff] [blame] | 34 | void addVlan(FabricVlan vlan); |
Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * Removes a vlan from all ports in the fabric. |
| 38 | * |
| 39 | * @param vlanId ID of vlan to remove |
| 40 | */ |
| 41 | void removeVlan(VlanId vlanId); |
| 42 | |
| 43 | /** |
| 44 | * Returns the vlan to port mapping for all vlans/ports configured in the |
| 45 | * fabric. |
| 46 | * |
| 47 | * @return mapping of vlan to port |
| 48 | */ |
Jonathan Hart | 443ebed | 2015-05-05 14:02:12 -0700 | [diff] [blame] | 49 | List<FabricVlan> getVlans(); |
Jonathan Hart | ea75084 | 2015-04-23 17:44:49 -0700 | [diff] [blame] | 50 | } |