Hyunsun Moon
Committed by Gerrit Code Review

Added a new method to create a port

Change-Id: I78db8cf5e1ab66d1497a8f9b706eef2202d50071
......@@ -74,9 +74,18 @@ public interface BridgeConfig extends HandlerBehaviour {
*
* @param port port number
*/
@Deprecated
void addPort(PortDescription port);
/**
* Adds a port to a given bridge.
*
* @param bridgeName bridge name
* @param portName port name
*/
void addPort(BridgeName bridgeName, String portName);
/**
* Delete a logical/virtual port.
*
* @param port port number
......
......@@ -104,6 +104,13 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour
}
@Override
public void addPort(BridgeName bridgeName, String portName) {
DriverHandler handler = handler();
OvsdbClientService clientService = getOvsdbClientService(handler);
clientService.createPort(bridgeName.name(), portName);
}
@Override
public void deletePort(PortDescription port) {
DriverHandler handler = handler();
OvsdbClientService clientService = getOvsdbClientService(handler);
......