blob: 5c2ce25caa5a0254d3e1b583c1b28836a97d3c59 [file] [log] [blame]
Jonathan Hartea750842015-04-23 17:44:49 -07001/*
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
17package org.onosproject.cordfabric;
18
Jonathan Hartea750842015-04-23 17:44:49 -070019import org.onlab.packet.VlanId;
Jonathan Hartea750842015-04-23 17:44:49 -070020
21import java.util.List;
22
23/**
24 * Service used to interact with fabric.
25 */
26public 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 Hart443ebed2015-05-05 14:02:12 -070032 * @param vlan vlan object to add
Jonathan Hartea750842015-04-23 17:44:49 -070033 */
Jonathan Hart443ebed2015-05-05 14:02:12 -070034 void addVlan(FabricVlan vlan);
Jonathan Hartea750842015-04-23 17:44:49 -070035
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 Hart443ebed2015-05-05 14:02:12 -070049 List<FabricVlan> getVlans();
Jonathan Hartea750842015-04-23 17:44:49 -070050}