blob: 96397eac2a5a0b5f1f369f3a30121f746853582c [file] [log] [blame]
CNluciusae5c3962015-08-21 14:33:26 +08001/*
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 */
16package org.onosproject.net.behaviour;
17
18import java.util.Collection;
19import java.util.Set;
20
21import org.onosproject.net.PortNumber;
22import org.onosproject.net.device.PortDescription;
23import org.onosproject.net.driver.HandlerBehaviour;
24
25/**
26 * Behaviour for handling various drivers for bridge configurations.
27 */
28public interface BridgeConfig extends HandlerBehaviour {
29
30 /**
31 * Add a bridge.
32 *
33 * @param bridgeName bridge name
34 */
35 void addBridge(BridgeName bridgeName);
36
37 /**
38 * Remove a bridge.
39 *
40 * @param bridgeName bridge name
41 */
42 void deleteBridge(BridgeName bridgeName);
43
44 /**
45 * Remove a bridge.
46 *
47 * @return bridge collection
48 */
49 Collection<BridgeDescription> getBridges();
50
51 /**
52 * Add a logical/virtual port.
53 *
54 * @param port port number
55 */
56 void addPort(PortDescription port);
57
58 /**
59 * Delete a logical/virtual port.
60 *
61 * @param port port number
62 */
63 void deletePort(PortDescription port);
64
65 /**
66 * Delete a logical/virtual port.
67 *
68 * @return collection of port
69 */
70 Collection<PortDescription> getPorts();
71
72 /**
73 * Get a collection of port.
74 *
75 * @return portNumbers set of PortNumber
76 */
77 Set<PortNumber> getPortNumbers();
78}