CNlucius | ae5c396 | 2015-08-21 14:33:26 +0800 | [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 | package org.onosproject.net.behaviour;
|
| 17 |
|
| 18 | import java.util.Collection;
|
| 19 | import java.util.Set;
|
| 20 |
|
| 21 | import org.onosproject.net.PortNumber;
|
| 22 | import org.onosproject.net.device.PortDescription;
|
| 23 | import org.onosproject.net.driver.HandlerBehaviour;
|
| 24 |
|
| 25 | /**
|
| 26 | * Behaviour for handling various drivers for bridge configurations.
|
| 27 | */
|
| 28 | public 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 | }
|