Committed by
Gerrit Code Review
Added a new method to create a port
Change-Id: I78db8cf5e1ab66d1497a8f9b706eef2202d50071
Showing
2 changed files
with
16 additions
and
0 deletions
... | @@ -74,9 +74,18 @@ public interface BridgeConfig extends HandlerBehaviour { | ... | @@ -74,9 +74,18 @@ public interface BridgeConfig extends HandlerBehaviour { |
74 | * | 74 | * |
75 | * @param port port number | 75 | * @param port port number |
76 | */ | 76 | */ |
77 | + @Deprecated | ||
77 | void addPort(PortDescription port); | 78 | void addPort(PortDescription port); |
78 | 79 | ||
79 | /** | 80 | /** |
81 | + * Adds a port to a given bridge. | ||
82 | + * | ||
83 | + * @param bridgeName bridge name | ||
84 | + * @param portName port name | ||
85 | + */ | ||
86 | + void addPort(BridgeName bridgeName, String portName); | ||
87 | + | ||
88 | + /** | ||
80 | * Delete a logical/virtual port. | 89 | * Delete a logical/virtual port. |
81 | * | 90 | * |
82 | * @param port port number | 91 | * @param port port number | ... | ... |
... | @@ -104,6 +104,13 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour | ... | @@ -104,6 +104,13 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour |
104 | } | 104 | } |
105 | 105 | ||
106 | @Override | 106 | @Override |
107 | + public void addPort(BridgeName bridgeName, String portName) { | ||
108 | + DriverHandler handler = handler(); | ||
109 | + OvsdbClientService clientService = getOvsdbClientService(handler); | ||
110 | + clientService.createPort(bridgeName.name(), portName); | ||
111 | + } | ||
112 | + | ||
113 | + @Override | ||
107 | public void deletePort(PortDescription port) { | 114 | public void deletePort(PortDescription port) { |
108 | DriverHandler handler = handler(); | 115 | DriverHandler handler = handler(); |
109 | OvsdbClientService clientService = getOvsdbClientService(handler); | 116 | OvsdbClientService clientService = getOvsdbClientService(handler); | ... | ... |
-
Please register or login to post a comment