- In FRM have the static flow APIs call the [install/uninstall/modify]FlowEntry() API
instead of the lower level [add/remove/modify]Entry() functions which do not perform
the container mode check
Change-Id: I8da638fcc36726f8f2dfe0b6733b49614329c7ab
Signed-off-by: Alessandro Boch <aboch@cisco.com>
}
// Program the network node
}
// Program the network node
- Status status = this.removeEntry(config.getFlowEntry(), false);
+ Status status = this.uninstallFlowEntry(config.getFlowEntry());
// Update configuration database if programming was successful
if (status.isSuccess()) {
// Update configuration database if programming was successful
if (status.isSuccess()) {
// If flow is installed, program the network node
status = new Status(StatusCode.SUCCESS, "Saved in config");
if (oldFlowConfig.installInHw()) {
// If flow is installed, program the network node
status = new Status(StatusCode.SUCCESS, "Saved in config");
if (oldFlowConfig.installInHw()) {
- status = this.modifyEntry(oldFlowConfig.getFlowEntry(), newFlowConfig.getFlowEntry(), false);
+ status = this.modifyFlowEntry(oldFlowConfig.getFlowEntry(), newFlowConfig.getFlowEntry());
}
// Update configuration database if programming was successful
}
// Update configuration database if programming was successful
}
if (target != null) {
// Program the network node
}
if (target != null) {
// Program the network node
- Status status;
- if (target.installInHw()) {
- status = this.removeEntry(target.getFlowEntry(), false);
- } else {
- status = this.addEntry(target.getFlowEntry(), false);
+ Status status = (target.installInHw()) ? this.uninstallFlowEntry(target.getFlowEntry()) : this
+ .installFlowEntry(target.getFlowEntry());
+ if (status.isSuccess()) {
+ // Update Configuration database
+ target.setStatus(SUCCESS);
+ target.toggleInstallation();
+ staticFlows.put(key, target);
- // Update Configuration database
- target.setStatus(SUCCESS);
- target.toggleInstallation();
- staticFlows.put(key, target);